Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix smpi replay issue
[simgrid.git] / src / surf / cpu.cpp
index 5d870ef..fe58cf0 100644 (file)
@@ -43,7 +43,7 @@ void CpuModel::updateActionsStateLazy(double now, double delta)
     //without losing the event ascending order (considering all CPU's)
     double smaller = -1;
     xbt_swag_foreach(_action, p_runningActionSet) {
-      action = (ActionLmmPtr) _action;
+      action = dynamic_cast<ActionLmmPtr>(static_cast<ActionPtr>(_action));
         if (smaller < 0) {
           smaller = action->m_lastUpdate;
           continue;
@@ -68,7 +68,7 @@ void CpuModel::updateActionsStateFull(double now, double delta)
   xbt_swag_t running_actions = p_runningActionSet;
 
   xbt_swag_foreach_safe(_action, _next_action, running_actions) {
-    action = (ActionLmmPtr) _action;
+    action = dynamic_cast<ActionLmmPtr>(static_cast<ActionPtr>(_action));
 #ifdef HAVE_TRACING
     if (TRACE_is_enabled()) {
       CpuPtr x = (CpuPtr) lmm_constraint_id(lmm_get_cnst_from_var