Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge if statements.
[simgrid.git] / teshsuite / surf / surf_usage2 / surf_usage2.cpp
index 1ce4276..41e5c97 100644 (file)
@@ -13,7 +13,6 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test, "Messages specific for surf example");
 
 int main(int argc, char **argv)
 {
-  double now = -1.0;
   int running;
 
   surf_init(&argc, argv);       /* Initialize some common structures */
@@ -40,10 +39,10 @@ int main(int argc, char **argv)
     surf_action_t action = nullptr;
     running = 0;
 
-    now = surf_get_clock();
+    double now = surf_get_clock();
     XBT_INFO("Next Event : %g", now);
 
-    for (auto model: *all_existing_models) {
+    for (auto const& model : *all_existing_models) {
       if (surf_model_running_action_set_size(model)) {
         XBT_DEBUG("\t Running that model");
         running = 1;