X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cc766a2d2cf7348b2b5f7d78ba1bd9005949c8bd..863aeead864a309c494893a1b06ec33ed2b7daf1:/src/xbt/heap.c diff --git a/src/xbt/heap.c b/src/xbt/heap.c index 5bfca96009..5bd06f3d8a 100644 --- a/src/xbt/heap.c +++ b/src/xbt/heap.c @@ -83,7 +83,8 @@ inline int xbt_heap_size(xbt_heap_t H) */ void xbt_heap_push(xbt_heap_t H, void *content, double key) { - int count = ++(H->count); + H->count += 1; + int count = H->count; int size = H->size; xbt_heap_item_t item; @@ -98,7 +99,6 @@ void xbt_heap_push(xbt_heap_t H, void *content, double key) item->content = content; xbt_heap_increase_key(H, count - 1); XBT_DEBUG("Heap has now %d elements and max elem is %g",xbt_heap_size(H),xbt_heap_maxkey(H)); - return; } /** @@ -277,5 +277,4 @@ static void xbt_heap_increase_key(xbt_heap_t H, int i) } if (H->update_callback) H->update_callback(items[i].content, i); - return; }