Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Disable the copy constructor and the copy-assignment operator for MailboxImpl.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 2 Mar 2022 21:38:11 +0000 (22:38 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 2 Mar 2022 21:38:11 +0000 (22:38 +0100)
Please Sonar rule cpp:S3624

src/kernel/activity/MailboxImpl.hpp

index 541283e..ce73552 100644 (file)
@@ -38,6 +38,8 @@ class MailboxImpl {
   static unsigned next_id_; // Next ID to be given
   const unsigned id_ = next_id_++;
   explicit MailboxImpl(const std::string& name) : piface_(this), name_(name) {}
+  MailboxImpl(const MailboxImpl&) = delete;
+  MailboxImpl& operator=(const MailboxImpl&) = delete;
 
 public:
   /** @brief Public interface */