- while ((!getActionHeap()->empty())
- && (double_equals(getActionHeap()->topKey(), now, sg_surf_precision))) {
-
- action = static_cast<CpuActionPtr>(getActionHeap()->topValue());
- getActionHeap()->pop();
+ while ((xbt_heap_size(getActionHeap()) > 0)
+ && (double_equals(xbt_heap_maxkey(getActionHeap()), now, sg_surf_precision))) {
+ action = static_cast<CpuActionPtr>(xbt_heap_pop(getActionHeap()));