From 638522d47ca9a907382b491eaed679f4ffbdbe9e Mon Sep 17 00:00:00 2001 From: Christian Schmidbauer Date: Wed, 11 Jun 2025 19:11:31 +0200 Subject: [PATCH] afanasy: delete copy and move operators of af::Msg avoids accidental usage of the operators --- afanasy/src/libafanasy/msg.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/afanasy/src/libafanasy/msg.h b/afanasy/src/libafanasy/msg.h index 3e33d9b35..e6c90aee7 100644 --- a/afanasy/src/libafanasy/msg.h +++ b/afanasy/src/libafanasy/msg.h @@ -241,5 +241,13 @@ TLAST void rw_header( bool write); ///< Read or write message header. void v_readwrite( Msg * msg); + + // Delete copy constructor and copy assignment as they are not implemented + Msg(const Msg &) = delete; + Msg &operator=(const Msg &) = delete; + + // Delete move constructor and move assignment as they are not implemented + Msg(Msg &&) = delete; + Msg &operator=(Msg &&) = delete; }; }