X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3b68ec95a7648e14307f1d31699c14532cfd86ee..1847d1441271d076b3de449c8853031ea208ce8f:/src/surf/plugins/host_energy.cpp diff --git a/src/surf/plugins/host_energy.cpp b/src/surf/plugins/host_energy.cpp index 97befbd3c6..6e102e470e 100644 --- a/src/surf/plugins/host_energy.cpp +++ b/src/surf/plugins/host_energy.cpp @@ -310,7 +310,7 @@ void HostEnergy::initWattsRangeList() XBT_DEBUG("%s: profile: %s, cores: %d", host->getCname(), all_power_values_str, host->getCoreCount()); int i = 0; - for (auto current_power_values_str : all_power_values) { + for (auto const& current_power_values_str : all_power_values) { /* retrieve the power values associated with the current pstate */ std::vector current_power_values; boost::split(current_power_values, current_power_values_str, boost::is_any_of(":")); @@ -370,7 +370,7 @@ static void onCreation(simgrid::s4u::Host& host) static void onActionStateChange(simgrid::surf::CpuAction* action, simgrid::surf::Action::State previous) { - for (simgrid::surf::Cpu* cpu : action->cpus()) { + for (simgrid::surf::Cpu* const& cpu : action->cpus()) { simgrid::s4u::Host* host = cpu->getHost(); if (host != nullptr) { @@ -464,7 +464,7 @@ void sg_host_energy_update_all() simgrid::simix::kernelImmediate([]() { std::vector list; simgrid::s4u::Engine::getInstance()->getHostList(&list); - for (auto host : list) + for (auto const& host : list) if (dynamic_cast(host) == nullptr) // Ignore virtual machines host->extension()->update(); });