Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make field private.
[simgrid.git] / src / surf / network_constant.cpp
index 35a66b6..1f97acc 100644 (file)
@@ -66,10 +66,9 @@ void NetworkConstantModel::updateActionsState(double /*now*/, double delta)
     if (action->getMaxDuration() != NO_MAX_DURATION)
       action->updateMaxDuration(delta);
 
-    if (((action->getRemainsNoUpdate() <= 0) ||
-         ((action->getMaxDuration() != NO_MAX_DURATION) && (action->getMaxDuration() <= 0)))) {
-      action->finish();
-      action->setState(Action::State::done);
+    if ((action->getRemainsNoUpdate() <= 0) ||
+        ((action->getMaxDuration() != NO_MAX_DURATION) && (action->getMaxDuration() <= 0))) {
+      action->finish(Action::State::done);
     }
   }
 }