Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
let base class dtor deal with surf action
[simgrid.git] / src / kernel / activity / ExecImpl.cpp
index b33bd1c..bffe2f5 100644 (file)
@@ -7,7 +7,6 @@
 #include "simgrid/Exception.hpp"
 #include "simgrid/modelchecker.h"
 #include "src/mc/mc_replay.hpp"
-#include "src/simix/smx_host_private.hpp"
 #include "src/surf/HostImpl.hpp"
 #include "src/surf/cpu_interface.hpp"
 #include "src/surf/surf_interface.hpp"
@@ -52,18 +51,16 @@ namespace simgrid {
 namespace kernel {
 namespace activity {
 
-ExecImpl::ExecImpl(std::string name, std::string tracing_category) : ActivityImpl(std::move(name))
+ExecImpl::ExecImpl(const std::string& name, const std::string& tracing_category) : ActivityImpl(name)
 {
   this->state_ = SIMIX_RUNNING;
-  this->set_category(std::move(tracing_category));
+  this->set_category(tracing_category);
 
   XBT_DEBUG("Create exec %p", this);
 }
 
 ExecImpl::~ExecImpl()
 {
-  if (surf_action_)
-    surf_action_->unref();
   if (timeout_detector_)
     timeout_detector_->unref();
   XBT_DEBUG("Destroy exec %p", this);
@@ -225,7 +222,7 @@ void ExecImpl::finish()
   }
 }
 
-ActivityImpl* ExecImpl::migrate(simgrid::s4u::Host* to)
+ActivityImpl* ExecImpl::migrate(s4u::Host* to)
 {
   if (not MC_is_active() && not MC_record_replay_is_active()) {
     resource::Action* old_action = this->surf_action_;