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);
}
}
simgrid::xbt::signal<void(simgrid::surf::CpuAction*, Action::State)> 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){