summaryrefslogtreecommitdiffhomepage
path: root/include/stc/algo/csort.h
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2023-01-19 21:20:16 +0100
committerTyge Løvset <[email protected]>2023-01-19 21:20:16 +0100
commitf8accdbcee0b397ad6ba2f2c2c64575a003e71e5 (patch)
tree1ec8e47eb15fd69d53e394e143c36d7f3500643e /include/stc/algo/csort.h
parent5aa48d538569463ffeda976d21f79edc5f276be4 (diff)
downloadSTC-modified-f8accdbcee0b397ad6ba2f2c2c64575a003e71e5.tar.gz
STC-modified-f8accdbcee0b397ad6ba2f2c2c64575a003e71e5.zip
Finish last commit. Most safe function macros are now preferred lowercase, whereas flow control macros (c_FOREACH, ..) are preferred uppercase.
Diffstat (limited to 'include/stc/algo/csort.h')
-rw-r--r--include/stc/algo/csort.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/stc/algo/csort.h b/include/stc/algo/csort.h
index 2cd7b548..9c9bcd5b 100644
--- a/include/stc/algo/csort.h
+++ b/include/stc/algo/csort.h
@@ -84,13 +84,13 @@ static inline void c_PASTE(cqsort_, i_tag)(i_val arr[], intptr_t lo, intptr_t hi
while (i_less((&arr[i]), (&pivot))) ++i;
while (i_less((&pivot), (&arr[j]))) --j;
if (i <= j) {
- c_SWAP(i_val, arr+i, arr+j);
+ c_swap(i_val, arr+i, arr+j);
++i; --j;
}
}
if (j - lo > hi - i) {
- c_SWAP(intptr_t, &lo, &i);
- c_SWAP(intptr_t, &hi, &j);
+ c_swap(intptr_t, &lo, &i);
+ c_swap(intptr_t, &hi, &j);
}
if (j - lo > 64) c_PASTE(cqsort_, i_tag)(arr, lo, j);