Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use plain pointers instead of references to pointer.
[simgrid.git] / src / plugins / host_energy.cpp
index 422ff2a..36e1044 100644 (file)
@@ -12,6 +12,7 @@
 #include <simgrid/simix.hpp>
 
 #include "src/kernel/resource/CpuImpl.hpp"
+#include "src/simgrid/module.hpp"
 
 #include <boost/algorithm/string/classification.hpp>
 #include <boost/algorithm/string/split.hpp>
@@ -419,7 +420,7 @@ static void on_creation(simgrid::s4u::Host& host)
 static void on_action_state_change(simgrid::kernel::resource::CpuAction const& action,
                                    simgrid::kernel::resource::Action::State /*previous*/)
 {
-  for (simgrid::kernel::resource::CpuImpl* const& cpu : action.cpus()) {
+  for (simgrid::kernel::resource::CpuImpl const* cpu : action.cpus()) {
     simgrid::s4u::Host* host = cpu->get_iface();
     if (host != nullptr) {
       // If it's a VM, take the corresponding PM