Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Constify pointer and reference local variables in src/bindings/.
[simgrid.git] / src / kernel / resource / DiskImpl.cpp
index f2877f2684120b871d96a20cd2621a08e917026e..18c7035ce3a1fa206b8c9be0f1165666672a3e3e 100644 (file)
@@ -37,10 +37,13 @@ DiskModel::~DiskModel()
 
 DiskImpl::DiskImpl(kernel::resource::Model* model, const std::string& name, kernel::lmm::System* maxminSystem,
                    double read_bw, double write_bw)
-    : Resource(model, name, maxminSystem->constraint_new(this, std::max(read_bw, write_bw))), piface_(name, this)
+    : Resource(model, name, maxminSystem->constraint_new(this, std::max(read_bw, write_bw)))
+    , piface_(name, this)
+    , read_bw_(read_bw)
+    , write_bw_(write_bw)
 {
   DiskImpl::turn_on();
-  XBT_DEBUG("Create resource with read_bw '%f' write_bw '%f'", read_bw, write_bw);
+  XBT_DEBUG("Create resource with read_bw '%f' write_bw '%f'", read_bw_, write_bw_);
   constraint_read_  = maxminSystem->constraint_new(this, read_bw);
   constraint_write_ = maxminSystem->constraint_new(this, write_bw);
 }
@@ -88,8 +91,7 @@ void DiskImpl::turn_off()
   }
 }
 
-xbt::signal<void(DiskAction const&, kernel::resource::Action::State, kernel::resource::Action::State)>
-    DiskAction::on_state_change;
+xbt::signal<void(DiskAction const&, Action::State, Action::State)> DiskAction::on_state_change;
 
 /**********
  * Action *