Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Disable unused copy constructors (and please cppcheck).
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 18 Jan 2018 09:21:13 +0000 (10:21 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 5 Feb 2018 15:35:12 +0000 (16:35 +0100)
examples/s4u/dht-kademlia/node.hpp
examples/s4u/dht-kademlia/routing_table.hpp

index 10625d0..178f380 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, 2014-2017. The SimGrid Team.
+/* Copyright (c) 2012, 2014-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -22,6 +22,8 @@ public:
   unsigned int find_node_success = 0; // Number of find_node which have succeeded.
   unsigned int find_node_failed  = 0; // Number of find_node which have failed.
   explicit Node(unsigned int node_id) : id_(node_id), table(new RoutingTable(node_id)), receive_comm(nullptr) {}
+  Node(const Node&) = delete;
+  Node& operator=(const Node&) = delete;
   ~Node() { delete table; }
   unsigned int getId() { return id_; }
 
index 60354ce..bbe7128 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, 2014, 2017. The SimGrid Team.
+/* Copyright (c) 2012, 2014, 2017-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@ class RoutingTable {
 public:
   Bucket** buckets; // Node bucket list - 160 sized.
   explicit RoutingTable(unsigned int node_id);
+  RoutingTable(const RoutingTable&) = delete;
+  RoutingTable& operator=(const RoutingTable&) = delete;
   ~RoutingTable();
   void print();
   Bucket* findBucket(unsigned int id);