X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fheap.h;h=8404858e6a516d9f318e340c7b324012d7003545;hb=b42162f5526360acc6930e3d2e296af1fef08e63;hp=a70fb2cd8c806551fe87b995e013913a3f581e4d;hpb=49ed04e2e93a6a5b01058638224621d5c07db01c;p=libucw.git 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)