From b8ac69d727c9eddbb832ed08c362c6d28ed32cfd Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sat, 26 Mar 2016 11:42:41 +0100 Subject: [PATCH] NetworkCste: Kill two methods overriden to the same content + rename a field --- src/surf/network_constant.cpp | 21 ++------------------- src/surf/network_constant.hpp | 4 +--- 2 files changed, 3 insertions(+), 22 deletions(-) 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_; }; } -- 2.20.1