X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/10ceac5fd14fb0426b5c93bda85676a79b02d0be..728a1c266d918708c40045c08980ef68ce696833:/src/simix/smx_global.cpp diff --git a/src/simix/smx_global.cpp b/src/simix/smx_global.cpp index 0a8a05c46b..b1e0b70468 100644 --- a/src/simix/smx_global.cpp +++ b/src/simix/smx_global.cpp @@ -531,13 +531,11 @@ void SIMIX_run() } while (again); /* Autorestart all process */ - char *hostname = nullptr; - unsigned int iter; - xbt_dynar_foreach(host_that_restart,iter,hostname) { - XBT_INFO("Restart processes on host: %s",hostname); - SIMIX_host_autorestart(sg_host_by_name(hostname)); + for (auto hostname: host_that_restart) { + XBT_INFO("Restart processes on host: %s", hostname.c_str()); + SIMIX_host_autorestart(sg_host_by_name(hostname.c_str())); } - xbt_dynar_reset(host_that_restart); + host_that_restart.clear(); /* Clean processes to destroy */ SIMIX_process_empty_trash();