From ca52553179820e7bbac038b847467ee1fce21c23 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Fri, 3 Nov 2023 13:57:31 +0100 Subject: [PATCH] Fix an ODR reported by ASan --- include/simgrid/plugins/solar_panel.hpp | 2 +- src/plugins/solar_panel.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/simgrid/plugins/solar_panel.hpp b/include/simgrid/plugins/solar_panel.hpp index 5fa424bd36..0ba319c059 100644 --- a/include/simgrid/plugins/solar_panel.hpp +++ b/include/simgrid/plugins/solar_panel.hpp @@ -42,7 +42,7 @@ class SolarPanel { friend void intrusive_ptr_add_ref(SolarPanel* o) { o->refcount_.fetch_add(1, std::memory_order_relaxed); } #endif - inline static xbt::signal on_power_change; + static xbt::signal on_power_change; xbt::signal on_this_power_change; public: diff --git a/src/plugins/solar_panel.cpp b/src/plugins/solar_panel.cpp index abf999513d..c6f2581f80 100644 --- a/src/plugins/solar_panel.cpp +++ b/src/plugins/solar_panel.cpp @@ -43,6 +43,8 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(SolarPanel, kernel, "Logging specific to the sol namespace simgrid::plugins { +xbt::signal SolarPanel::on_power_change; + /* SolarPanel */ void SolarPanel::update() -- 2.20.1