Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
don't create temporary struct at time of push_back as it may be deleted prematurely...
[simgrid.git] / teshsuite / s4u / comm-fault-scenarios / comm-fault-scenarios.cpp
index 4066f4a..fb881c8 100644 (file)
@@ -457,7 +457,8 @@ static void prepareScenario(ScenarioContext& ctx, CommType type, double duration
           DIE_IMPOSSIBLE;
       }
     }
-    ctx.scenarios.push_back({type, ctx.start_time, duration, sender_expected, receiver_expected, steps, ctx.index});
+    Scenario scen{type, ctx.start_time, duration, sender_expected, receiver_expected, steps, ctx.index};
+    ctx.scenarios.push_back(scen);
     ctx.active++;
   }
   ctx.index++;