X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7263d4ee073e1ff17648971a077f7057ce2f4076..4bd1f48f0bf1ad1703be680ec2a38d626c6a2668:/src/surf/cpu_interface.cpp diff --git a/src/surf/cpu_interface.cpp b/src/surf/cpu_interface.cpp index 7e992a6d43..e8282cbba4 100644 --- a/src/surf/cpu_interface.cpp +++ b/src/surf/cpu_interface.cpp @@ -110,7 +110,7 @@ Cpu::Cpu(Model* model, simgrid::s4u::Host* host, lmm_constraint_t constraint, st xbt_assert(speed_.scale > 0, "Speed of host %s must be >0", host->getCname()); // Copy the power peak array: - for (double value : *speedPerPstate) { + for (double const& value : *speedPerPstate) { speedPerPstate_.push_back(value); } } @@ -211,15 +211,15 @@ void CpuAction::updateRemainingLazy(double now) simgrid::xbt::signal CpuAction::onStateChange; void CpuAction::suspend(){ - Action::State previous = getState(); - onStateChange(this, previous); - Action::suspend(); + Action::State previous = getState(); + onStateChange(this, previous); + Action::suspend(); } void CpuAction::resume(){ - Action::State previous = getState(); - onStateChange(this, previous); - Action::resume(); + Action::State previous = getState(); + onStateChange(this, previous); + Action::resume(); } void CpuAction::setState(Action::State state){