From d2c554ee0deeb64a805549d230ff8467ff6601f4 Mon Sep 17 00:00:00 2001 From: Nicholas Date: Mon, 15 Nov 2021 18:43:12 -0800 Subject: Fix: Qsort had bad macro capture --- include/base/macro/qsort.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/base') diff --git a/include/base/macro/qsort.h b/include/base/macro/qsort.h index 6d0acaa..46779d4 100644 --- a/include/base/macro/qsort.h +++ b/include/base/macro/qsort.h @@ -2,7 +2,7 @@ /* * Nicholas Noll (2020) - * Straight implementation of Sedgewick's median qsort + * Straight implementation of Sedgewick's median qsort * #ref: "Implementing Quicksort Programs" (1978) * * @LEN: name of parameter length @@ -27,7 +27,7 @@ \ if (LEN <= 14) goto ENDOUTER; \ OUTERLOOP: \ - SWAP((l+r)/2, l+1); \ + QSWAP((l+r)/2, l+1); \ \ if (QLESS(r, l+1)) QSWAP(r, l+1); \ if (QLESS(r, l)) QSWAP(r, l); \ @@ -88,4 +88,4 @@ ENDOUTER: \ for (j = i; j > 0 && QLESS(j, j-1); j--) { \ QSWAP(j, j-1); \ } \ - } + } -- cgit v1.2.1