X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d67dd902c1ba20335b3446d7462d046f984ad3e4..c0bda26f8216132898999052ea1fdbbe01fd2aa0:/src/surf/network_cm02.cpp diff --git a/src/surf/network_cm02.cpp b/src/surf/network_cm02.cpp index 35db28a6d4..bd5b18af45 100644 --- a/src/surf/network_cm02.cpp +++ b/src/surf/network_cm02.cpp @@ -171,10 +171,9 @@ LinkImpl* NetworkCm02Model::createLink(const std::string& name, double bandwidth void NetworkCm02Model::updateActionsStateLazy(double now, double /*delta*/) { - while ((xbt_heap_size(getActionHeap()) > 0) && - (double_equals(xbt_heap_maxkey(getActionHeap()), now, sg_surf_precision))) { + while (not actionHeapIsEmpty() && double_equals(actionHeapTopDate(), now, sg_surf_precision)) { - NetworkCm02Action* action = static_cast(xbt_heap_pop(getActionHeap())); + NetworkCm02Action* action = static_cast(actionHeapPop()); XBT_DEBUG("Something happened to action %p", action); if (TRACE_is_enabled()) { int n = lmm_get_number_of_cnst_from_var(maxminSystem_, action->getVariable()); @@ -290,7 +289,6 @@ Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double siz action->latency_ = latency; action->rate_ = rate; if (getUpdateMechanism() == UM_LAZY) { - action->updateIndexHeap(-1); action->refreshLastUpdate(); }