From: Martin Mares Date: Mon, 16 Jan 2006 14:00:03 +0000 (+0000) Subject: Instead of adding HEAP_INCREASE_POS as Tom requested, I've modified X-Git-Tag: holmes-import~694 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=176272fb9a0a5b0b07805806353a422411a80bcf;p=libucw.git Instead of adding HEAP_INCREASE_POS as Tom requested, I've modified HEAP_INCREASE. I think this is a better solution, because increasing the value of the root element is too special and knowing that doesn't enable us to do any special optimizations anyway. --- diff --git a/lib/heap.h b/lib/heap.h index b7bc1065..4f83776f 100644 --- a/lib/heap.h +++ b/lib/heap.h @@ -63,11 +63,11 @@ HEAP_BUBBLE_UP_J(heap,num,less,swap); \ } while(0) -#define HEAP_INCREASE(type,heap,num,less,swap) \ +#define HEAP_INCREASE(type,heap,num,less,swap,pos) \ do { \ uns _j, _l; \ type x; \ - _j = 1; \ + _j = pos; \ HEAP_BUBBLE_DOWN_J(heap,num,less,swap); \ } while(0)