From: Martin Quinson Date: Sat, 26 Mar 2016 10:42:41 +0000 (+0100) Subject: NetworkCste: Kill two methods overriden to the same content X-Git-Tag: v3_13~279 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/b8ac69d727c9eddbb832ed08c362c6d28ed32cfd NetworkCste: Kill two methods overriden to the same content + rename a field --- diff --git a/src/surf/network_constant.cpp b/src/surf/network_constant.cpp index 62f97f3f0a..8d88832c3a 100644 --- a/src/surf/network_constant.cpp +++ b/src/surf/network_constant.cpp @@ -64,7 +64,7 @@ namespace simgrid { action->latency_ = 0.0; } } - action->updateRemains(action->getCost() * delta / action->m_latInit); + action->updateRemains(action->getCost() * delta / action->initialLatency_); if (action->getMaxDuration() != NO_MAX_DURATION) action->updateMaxDuration(delta); @@ -92,7 +92,7 @@ namespace simgrid { **********/ NetworkConstantAction::NetworkConstantAction(NetworkConstantModel *model_, double size, double latency) : NetworkAction(model_, size, false) - , m_latInit(latency) + , initialLatency_(latency) { latency_ = latency; if (latency_ <= 0.0) { @@ -101,22 +101,5 @@ namespace simgrid { } variable_ = NULL; }; - - int NetworkConstantAction::unref() - { - refcount_--; - if (!refcount_) { - if (action_hook.is_linked()) - stateSet_->erase(stateSet_->iterator_to(*this)); - delete this; - return 1; - } - return 0; - } - - void NetworkConstantAction::cancel() - { - } - } } diff --git a/src/surf/network_constant.hpp b/src/surf/network_constant.hpp index ce4160634a..6f88d3aea2 100644 --- a/src/surf/network_constant.hpp +++ b/src/surf/network_constant.hpp @@ -43,9 +43,7 @@ namespace simgrid { class NetworkConstantAction : public NetworkAction { public: NetworkConstantAction(NetworkConstantModel *model_, double size, double latency); - int unref() override; - void cancel() override; - double m_latInit; + double initialLatency_; }; }