From cab386086509de5dd4b87179d9e149c017fdc707 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Tue, 10 Feb 2004 18:18:12 +0000 Subject: [PATCH] Supply default element swapping macro. --- lib/heap.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/heap.h b/lib/heap.h index a70fb2cd..8404858e 100644 --- a/lib/heap.h +++ b/lib/heap.h @@ -82,3 +82,6 @@ else \ HEAP_BUBBLE_DOWN_J(heap,num,less,swap); \ } while(0) + +/* Default swapping macro */ +#define HEAP_SWAP(heap,a,b,t) (t=heap[a], heap[a]=heap[b], heap[b]=t) -- 2.39.2