Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Delete the implicitely defined move constructor.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 14 Apr 2021 14:13:59 +0000 (16:13 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 14 Apr 2021 19:09:56 +0000 (21:09 +0200)
Fix for sonar issue S5018: Move and swap operations should be "noexcept"

examples/cpp/dht-kademlia/routing_table.hpp

index a87fd2f..08be667 100644 (file)
@@ -18,7 +18,9 @@ public:
   const unsigned int id_;          // bucket id
   std::deque<unsigned int> nodes_; // Nodes in the bucket.
   unsigned int getId() const { return id_; }
-  explicit Bucket(unsigned int id) noexcept : id_(id) {}
+  explicit Bucket(unsigned int id) : id_(id) {}
+  Bucket(const Bucket&) = default;
+  Bucket(Bucket&&)      = delete;
 };
 
 /* Node routing table */