Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Constify pointer and reference parameters in src/surf/.
[simgrid.git] / src / surf / cpu_ti.cpp
index 765354b..cdef36a 100644 (file)
@@ -23,7 +23,7 @@ namespace resource {
  * Trace *
  *********/
 
-CpuTiProfile::CpuTiProfile(profile::Profile* profile)
+CpuTiProfile::CpuTiProfile(const profile::Profile* profile)
 {
   double integral = 0;
   double time = 0;
@@ -222,7 +222,6 @@ CpuTiTmgr::CpuTiTmgr(kernel::profile::Profile* speed_profile, double value) : sp
 
   /* no availability file, fixed trace */
   if (not speed_profile) {
-    type_  = Type::FIXED;
     value_ = value;
     XBT_DEBUG("No availability trace. Constant value = %f", value);
     return;
@@ -230,7 +229,6 @@ CpuTiTmgr::CpuTiTmgr(kernel::profile::Profile* speed_profile, double value) : sp
 
   /* only one point available, fixed trace */
   if (speed_profile->event_list.size() == 1) {
-    type_  = Type::FIXED;
     value_ = speed_profile->event_list.front().value_;
     return;
   }
@@ -291,7 +289,7 @@ kernel::resource::Cpu* CpuTiModel::create_cpu(s4u::Host* host, const std::vector
   return new CpuTi(this, host, speed_per_pstate, core);
 }
 
-double CpuTiModel::next_occuring_event(double now)
+double CpuTiModel::next_occurring_event(double now)
 {
   double min_action_duration = -1;