Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Avoid unnecessary copy by using a 'const' reference (sonar).
[simgrid.git] / src / instr / instr_paje_values.hpp
index cec347f..16e716b 100644 (file)
@@ -13,13 +13,13 @@ namespace simgrid {
 namespace instr {
 
 class EntityValue {
-  long long int id_;
+  long long int id_ = new_paje_id();
   std::string name_;
   std::string color_;
   Type* father_;
 
 public:
-  static xbt::signal<void(EntityValue&)> on_creation;
+  static xbt::signal<void(const EntityValue&)> on_creation;
   explicit EntityValue(const std::string& name, const std::string& color, Type* father);
 
   long long int get_id() const { return id_; }