Skip to content

Commit 0e62c90

Browse files
committed
Apply review comments
1 parent f4b20ba commit 0e62c90

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

libc/src/stdlib/qsort_pivot.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,10 @@ size_t choose_pivot(const A &array, const F &is_less) {
3535
const size_t b = len_div_8 * 4; // [4*floor(n/8), 5*floor(n/8))
3636
const size_t c = len_div_8 * 7; // [7*floor(n/8), 8*floor(n/8))
3737

38-
if (len < PSEUDO_MEDIAN_REC_THRESHOLD) {
38+
if (len < PSEUDO_MEDIAN_REC_THRESHOLD)
3939
return median3(array, a, b, c, is_less);
40-
} else {
40+
else
4141
return median3_rec(array, a, b, c, len_div_8, is_less);
42-
}
4342
}
4443

4544
// Calculates an approximate median of 3 elements from sections a, b, c, or

libc/src/stdlib/qsort_util.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,9 @@
1515
#define LIBC_QSORT_QUICK_SORT 1
1616
#define LIBC_QSORT_HEAP_SORT 2
1717

18-
#ifdef LIBC_OPTIMIZE_FOR_SIZE
19-
#define LIBC_QSORT_IMPL LIBC_QSORT_HEAP_SORT
20-
#else
2118
#ifndef LIBC_QSORT_IMPL
2219
#define LIBC_QSORT_IMPL LIBC_QSORT_QUICK_SORT
2320
#endif // LIBC_QSORT_IMPL
24-
#endif // LIBC_OPTIMIZE_FOR_SIZE
2521

2622
#if (LIBC_QSORT_IMPL != LIBC_QSORT_QUICK_SORT && \
2723
LIBC_QSORT_IMPL != LIBC_QSORT_HEAP_SORT)

0 commit comments

Comments
 (0)