Cleanup: simplify heap popmin

This commit is contained in:
Campbell Barton 2014-12-09 00:13:35 +01:00
parent 03760fed0d
commit 55812e3acd

@ -205,13 +205,8 @@ void *BLI_heap_popmin(Heap *heap)
heap->tree[0]->ptr = heap->freenodes;
heap->freenodes = heap->tree[0];
if (UNLIKELY(heap->size == 1)) {
heap->size--;
}
else {
heap_swap(heap, 0, heap->size - 1);
heap->size--;
if (--heap->size) {
heap_swap(heap, 0, heap->size);
heap_down(heap, 0);
}