Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix an ODR reported by ASan
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Tue, 14 Nov 2023 19:48:40 +0000 (20:48 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Tue, 14 Nov 2023 19:48:40 +0000 (20:48 +0100)
include/simgrid/plugins/chiller.hpp
src/plugins/chiller.cpp

index 8f9611b..bf28b48 100644 (file)
@@ -68,7 +68,7 @@ private:
   friend void intrusive_ptr_add_ref(Chiller* o) { o->refcount_.fetch_add(1, std::memory_order_relaxed); }
 #endif
 
-  inline static xbt::signal<void(Chiller*)> on_power_change;
+  static xbt::signal<void(Chiller*)> on_power_change;
   xbt::signal<void(Chiller*)> on_this_power_change;
 
 public:
index 3cec29d..7d2b9de 100644 (file)
@@ -57,6 +57,7 @@ chiller is not active, the temperature of the room increases.
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(Chiller, kernel, "Logging specific to the solar panel plugin");
 
 namespace simgrid::plugins {
+xbt::signal<void(Chiller*)> Chiller::on_power_change; // initialisation of static field
 
 /* ChillerModel */