Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Constify pointer and reference parameters in examples/.
[simgrid.git] / examples / s4u / dht-kademlia / answer.hpp
index 0e678a8..c513478 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2018. The SimGrid Team.
+/* Copyright (c) 2012-2019. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -23,13 +23,13 @@ public:
   std::vector<std::pair<unsigned int, unsigned int>> nodes;
   explicit Answer(unsigned int destination_id) : destination_id_(destination_id) {}
   virtual ~Answer() = default;
-  unsigned int getDestinationId() { return destination_id_; }
+  unsigned int getDestinationId() const { return destination_id_; }
   unsigned int getSize() { return size_; }
   void print();
-  unsigned int merge(Answer* a);
+  unsigned int merge(const Answer* a);
   void trim();
   bool destinationFound();
-  void addBucket(kademlia::Bucket* bucket);
+  void addBucket(const kademlia::Bucket* bucket);
 };
 }