From 176272fb9a0a5b0b07805806353a422411a80bcf Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 16 Jan 2006 14:00:03 +0000 Subject: [PATCH] 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. --- lib/heap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.39.2