]> AND Public Git Repository - simgrid.git/blobdiff - src/surf/cpu_ti.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Variables captured by copy are constant and cannot be std::move'd.
[simgrid.git] / src / surf / cpu_ti.cpp
index f4035b76033b021d9c03d58d7e1937d18c266894..9b37aa12b7ffa3215022c44d8b82d6d2091bbc48 100644 (file)
@@ -10,6 +10,7 @@
 #include "surf/surf.hpp"
 
 #include <algorithm>
+#include <memory>
 
 constexpr double EPSILON = 0.000000001;
 
@@ -238,7 +239,7 @@ CpuTiTmgr::CpuTiTmgr(kernel::profile::Profile* speed_profile, double value) : sp
   for (auto const& val : speed_profile->event_list)
     total_time += val.date_;
 
-  profile_.reset(new CpuTiProfile(speed_profile));
+  profile_   = std::make_unique<CpuTiProfile>(speed_profile);
   last_time_ = total_time;
   total_     = profile_->integrate_simple(0, total_time);
 
@@ -457,7 +458,7 @@ void CpuTi::update_actions_finish_time(double now)
   set_modified(false);
 }
 
-bool CpuTi::is_used()
+bool CpuTi::is_used() const
 {
   return not action_set_.empty();
 }