From 921f0e6ec722940a1e37660e1291aa69f9f39db8 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 15 Oct 2018 22:19:17 -0700 Subject: [PATCH] [vector] Simplify sort Hopefully this fits fine with SFINAE with all our compilers. --- src/hb-vector.hh | 7 +------ 1 file changed, 1 insertion(+), 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); -- GitLab