From: Martin Quinson Date: Sun, 1 Apr 2018 09:07:13 +0000 (+0200) Subject: inline a useless function X-Git-Tag: v3.20~557 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/499ee6ecf7dd2ec57ed57613da3ea947d42de781 inline a useless function --- diff --git a/include/simgrid/kernel/resource/Model.hpp b/include/simgrid/kernel/resource/Model.hpp index 195683321b..e1faffb615 100644 --- a/include/simgrid/kernel/resource/Model.hpp +++ b/include/simgrid/kernel/resource/Model.hpp @@ -60,7 +60,6 @@ public: double actionHeapTopDate() const { return action_heap_.top().first; } Action* actionHeapPop(); - bool actionHeapIsEmpty() const { return action_heap_.empty(); } /** * @brief Share the resources between the actions diff --git a/src/kernel/resource/Model.cpp b/src/kernel/resource/Model.cpp index 3eb402da80..fab52e2bb5 100644 --- a/src/kernel/resource/Model.cpp +++ b/src/kernel/resource/Model.cpp @@ -100,7 +100,7 @@ double Model::next_occuring_event_lazy(double now) } // hereafter must have already the min value for this resource model - if (not actionHeapIsEmpty()) { + if (not action_heap_.empty()) { double min = actionHeapTopDate() - now; XBT_DEBUG("minimum with the HEAP %f", min); return min; diff --git a/src/surf/cpu_interface.cpp b/src/surf/cpu_interface.cpp index 97473382c5..ceb797d26f 100644 --- a/src/surf/cpu_interface.cpp +++ b/src/surf/cpu_interface.cpp @@ -22,7 +22,7 @@ namespace surf { void CpuModel::update_actions_state_lazy(double now, double /*delta*/) { - while (not actionHeapIsEmpty() && double_equals(actionHeapTopDate(), now, sg_surf_precision)) { + while (not get_action_heap().empty() && double_equals(actionHeapTopDate(), now, sg_surf_precision)) { CpuAction* action = static_cast(actionHeapPop()); XBT_CDEBUG(surf_kernel, "Something happened to action %p", action); diff --git a/src/surf/cpu_ti.cpp b/src/surf/cpu_ti.cpp index a76da40705..7df39bf75d 100644 --- a/src/surf/cpu_ti.cpp +++ b/src/surf/cpu_ti.cpp @@ -332,7 +332,7 @@ double CpuTiModel::next_occuring_event(double now) } /* get the min next event if heap not empty */ - if (not actionHeapIsEmpty()) + if (not get_action_heap().empty()) min_action_duration = actionHeapTopDate() - now; XBT_DEBUG("Share resources, min next event date: %f", min_action_duration); @@ -342,7 +342,7 @@ double CpuTiModel::next_occuring_event(double now) void CpuTiModel::update_actions_state(double now, double /*delta*/) { - while (not actionHeapIsEmpty() && actionHeapTopDate() <= now) { + while (not get_action_heap().empty() && actionHeapTopDate() <= now) { CpuTiAction* action = static_cast(actionHeapPop()); XBT_DEBUG("Action %p: finish", action); action->finish(kernel::resource::Action::State::done); diff --git a/src/surf/network_cm02.cpp b/src/surf/network_cm02.cpp index 157456c45d..fb07e6b583 100644 --- a/src/surf/network_cm02.cpp +++ b/src/surf/network_cm02.cpp @@ -159,7 +159,7 @@ LinkImpl* NetworkCm02Model::createLink(const std::string& name, double bandwidth void NetworkCm02Model::update_actions_state_lazy(double now, double /*delta*/) { - while (not actionHeapIsEmpty() && double_equals(actionHeapTopDate(), now, sg_surf_precision)) { + while (not get_action_heap().empty() && double_equals(actionHeapTopDate(), now, sg_surf_precision)) { NetworkCm02Action* action = static_cast(actionHeapPop()); XBT_DEBUG("Something happened to action %p", action);