X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/17a5f55527a7fd22835025e89f1e8f75aed15849..1847d1441271d076b3de449c8853031ea208ce8f:/src/simix/smx_global.cpp diff --git a/src/simix/smx_global.cpp b/src/simix/smx_global.cpp index 2f8eac9704..dd8daa8d6f 100644 --- a/src/simix/smx_global.cpp +++ b/src/simix/smx_global.cpp @@ -340,7 +340,7 @@ static void SIMIX_wake_processes() { surf_action_t action; - for(auto model : *all_existing_models) { + for (auto const& model : *all_existing_models) { XBT_DEBUG("Handling the processes whose action failed (if any)"); while ((action = surf_model_extract_failed_action_set(model))) { XBT_DEBUG(" Handling Action %p",action); @@ -482,7 +482,7 @@ void SIMIX_run() * That would thus be a pure waste of time. */ - for (smx_actor_t process : simix_global->process_that_ran) { + for (smx_actor_t const& process : simix_global->process_that_ran) { if (process->simcall.call != SIMCALL_NONE) { SIMIX_simcall_handle(&process->simcall, 0); } @@ -495,7 +495,7 @@ void SIMIX_run() /* If only daemon processes remain, cancel their actions, mark them to die and reschedule them */ if (simix_global->process_list.size() == simix_global->daemons.size()) - for (const auto& dmon : simix_global->daemons) { + for (auto const& dmon : simix_global->daemons) { XBT_DEBUG("Kill %s", dmon->cname()); SIMIX_process_kill(dmon, simix_global->maestro_process); } @@ -522,7 +522,7 @@ void SIMIX_run() } while (again); /* Autorestart all process */ - for (auto host: host_that_restart) { + for (auto const& host : host_that_restart) { XBT_INFO("Restart processes on host %s", host->getCname()); SIMIX_host_autorestart(host); } @@ -629,7 +629,7 @@ void SIMIX_display_process_status() XBT_INFO("%d processes are still running, waiting for something.", nbprocess); /* List the process and their state */ XBT_INFO("Legend of the following listing: \"Process (@): \""); - for (auto kv : simix_global->process_list) { + for (auto const& kv : simix_global->process_list) { smx_actor_t process = kv.second; if (process->waiting_synchro) {