diff options
Diffstat (limited to 'include/base/macro/qsort.h')
-rw-r--r-- | include/base/macro/qsort.h | 6 |
1 files changed, 3 insertions, 3 deletions
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); \ } \ - } + } |