Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Compare file prefix only.
[simgrid.git] / src / surf / cpu_interface.cpp
index 7e992a6..e8282cb 100644 (file)
@@ -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<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){