Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git] / src / surf / plugins / host_load.cpp
index 71ccf35..f1e039a 100644 (file)
@@ -127,7 +127,7 @@ static void onHostChange(simgrid::s4u::Host& host)
 /* This callback is called when an action (computation, idle, ...) terminates */
 static void onActionStateChange(simgrid::surf::CpuAction* action, simgrid::surf::Action::State previous)
 {
-  for (simgrid::surf::Cpu* cpu : action->cpus()) {
+  for (simgrid::surf::Cpu* const& cpu : action->cpus()) {
     simgrid::s4u::Host* host = cpu->getHost();
 
     if (host != nullptr) {
@@ -139,7 +139,7 @@ static void onActionStateChange(simgrid::surf::CpuAction* action, simgrid::surf:
 }
 
 /* **************************** Public interface *************************** */
-SG_BEGIN_DECL()
+extern "C" {
 
 /** \ingroup plugin_load
  * \brief Initializes the HostLoad plugin
@@ -185,5 +185,4 @@ void sg_host_load_reset(sg_host_t host)
 
   host->extension<HostLoad>()->reset();
 }
-
-SG_END_DECL()
+}