From 43a14a5149b59a5c9491688d4247272075886337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20O=2E=20Sel=C3=A5sdal?= Date: Tue, 3 Dec 2013 17:30:37 +0100 Subject: [PATCH] Add comments to compare/swap function --- include/ucore/heapsort.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/ucore/heapsort.h b/include/ucore/heapsort.h index d6c9a57..fcaf426 100644 --- a/include/ucore/heapsort.h +++ b/include/ucore/heapsort.h @@ -7,10 +7,10 @@ extern "C" { #endif ///compare function. Needs only to return < 0 if -//the first element is less than the second -typedef int (*uc_hs_cmp)(const void *, const void *, void *cookie); -//swap function -typedef void (*uc_hs_swp)(void *, void *); +//a is less tan b +typedef int (*uc_hs_cmp)(const void *a, const void *b, void *cookie); +//swap function, must swap around element a and b +typedef void (*uc_hs_swp)(void *a, void *b); /** Sort an array. * @param base start of array