diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2018-10-15 22:19:17 -0700 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2018-10-15 22:19:17 -0700 |
commit | cfd340199bc1e676a21acd63ac8347107fc6601d (patch) | |
tree | 84795c2345360b9a87c26efbe3df8c38dc95f7c0 | |
parent | 0bce6820ab938432b59b9dddc0484772fe8ef359 (diff) |
[vector] Simplify sort
Hopefully this fits fine with SFINAE with all our compilers.
-rw-r--r-- | src/hb-vector.hh | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/hb-vector.hh b/src/hb-vector.hh index 766e5fb8..38d08cb7 100644 --- a/src/hb-vector.hh +++ b/src/hb-vector.hh @@ -179,16 +179,11 @@ struct hb_vector_t return nullptr; } - inline void qsort (int (*cmp)(const void*, const void*)) + inline void qsort (int (*cmp)(const void*, const void*) = Type::cmp) { ::qsort (arrayZ(), len, sizeof (Type), cmp); } - inline void qsort (void) - { - ::qsort (arrayZ(), len, sizeof (Type), Type::cmp); - } - inline void qsort (unsigned int start, unsigned int end) { ::qsort (arrayZ() + start, end - start, sizeof (Type), Type::cmp); |