X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c1b3e440de2150420b08c0bc55a125a0c9eb86bc..8d3f939a94cc6994ff93c46e33cec56b34374f6d:/src/s4u/s4u_Exec.cpp diff --git a/src/s4u/s4u_Exec.cpp b/src/s4u/s4u_Exec.cpp index 0ecdc7292e..d75abb13cb 100644 --- a/src/s4u/s4u_Exec.cpp +++ b/src/s4u/s4u_Exec.cpp @@ -19,16 +19,14 @@ Exec::Exec(sg_host_t host, double flops_amount) : Activity(), host_(host), flops { Activity::set_remaining(flops_amount_); pimpl_ = simix::simcall([this] { - return kernel::activity::ExecImplPtr(new kernel::activity::ExecImpl(name_, tracing_category_, - /*timeout_detector*/ nullptr, host_)); + return kernel::activity::ExecImplPtr(new kernel::activity::ExecImpl(name_, tracing_category_, host_)); }); } Exec* Exec::start() { - simix::simcall([this] { - dynamic_cast(pimpl_.get())->start(flops_amount_, 1. / priority_, bound_); - }); + simix::simcall( + [this] { static_cast(pimpl_.get())->start(flops_amount_, 1. / priority_, bound_); }); state_ = State::STARTED; on_start(Actor::self()); return this; @@ -36,7 +34,7 @@ Exec* Exec::start() Exec* Exec::cancel() { - simgrid::simix::simcall([this] { dynamic_cast(pimpl_.get())->cancel(); }); + simgrid::simix::simcall([this] { static_cast(pimpl_.get())->cancel(); }); state_ = State::CANCELED; return this; } @@ -54,7 +52,6 @@ Exec* Exec::wait() Exec* Exec::wait_for(double) { THROW_UNIMPLEMENTED; - return this; } /** @brief Returns whether the state of the exec is finished */