Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Fri, 3 Mar 2017 13:16:36 +0000 (14:16 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Fri, 3 Mar 2017 13:16:36 +0000 (14:16 +0100)
src/surf/cpu_interface.cpp

index 4e42b21..a22fd69 100644 (file)
@@ -64,8 +64,10 @@ void CpuModel::updateActionsStateFull(double now, double delta)
   CpuAction *action = nullptr;
   ActionList *running_actions = getRunningActionSet();
   ActionList::iterator it(running_actions->begin());
-  ActionList::iterator itend(running_actions->end()) for (; it != itend; ++it)
-  {
+  ActionList::iterator itNext = it;
+  ActionList::iterator itend(running_actions->end());
+  for (; it != itend; it = itNext) {
+    ++itNext;
     action = static_cast<CpuAction*>(&*it);
     if (TRACE_is_enabled()) {
       Cpu *cpu = static_cast<Cpu*> (lmm_constraint_id(lmm_get_cnst_from_var(getMaxminSystem(), action->getVariable(), 0)) );