Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reindent.
[simgrid.git] / src / surf / network_cm02.cpp
index e0ae4e4..e7b27ac 100644 (file)
@@ -9,7 +9,7 @@
 #include "network_cm02.hpp"
 #include "simgrid/s4u/Host.hpp"
 #include "simgrid/sg_config.h"
-#include "src/instr/instr_private.h" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals
+#include "src/instr/instr_private.hpp" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_network);
 
@@ -204,8 +204,7 @@ void NetworkCm02Model::updateActionsStateLazy(double now, double /*delta*/)
         // assume that flows that reached max_duration have remaining of 0
       XBT_DEBUG("Action %p finished", action);
       action->setRemains(0);
-      action->finish();
-      action->setState(Action::State::done);
+      action->finish(Action::State::done);
       action->heapRemove(actionHeap_);
     }
   }
@@ -259,8 +258,7 @@ void NetworkCm02Model::updateActionsStateFull(double now, double delta)
 
     if (((action->getRemains() <= 0) && (lmm_get_variable_weight(action->getVariable()) > 0)) ||
         ((action->getMaxDuration() > NO_MAX_DURATION) && (action->getMaxDuration() <= 0))) {
-      action->finish();
-      action->setState(Action::State::done);
+      action->finish(Action::State::done);
     }
   }
 }
@@ -492,8 +490,7 @@ void NetworkCm02Action::updateRemainingLazy(double now)
 
   if ((remains_ <= 0 && (lmm_get_variable_weight(getVariable()) > 0)) ||
       ((maxDuration_ > NO_MAX_DURATION) && (maxDuration_ <= 0))) {
-    finish();
-    setState(Action::State::done);
+    finish(Action::State::done);
     heapRemove(getModel()->getActionHeap());
   }