X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fheap.h;h=8404858e6a516d9f318e340c7b324012d7003545;hb=1b0a16240bdcc069979452f56fbbf2299625be78;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)