Revert "[vector] Simplify Sort" and "More of the same"

This reverts commit de0b9a4664.
This reverts commit 921f0e6ec7.

Annnnd, revert.  MSVC doesn't like it.
This commit is contained in:
Behdad Esfahbod 2018-10-16 13:32:52 -07:00
parent 661340c475
commit 5eb7e7f646

View File

@ -179,14 +179,19 @@ struct hb_vector_t
return nullptr;
}
inline void qsort (int (*cmp)(const void*, const void*) = Type::cmp)
inline void qsort (int (*cmp)(const void*, const void*))
{
::qsort (arrayZ(), len, sizeof (Type), cmp);
}
inline void qsort (unsigned int start, unsigned int end, int (*cmp)(const void*, const void*) = Type::cmp)
inline void qsort (void)
{
::qsort (arrayZ() + start, end - start, sizeof (Type), cmp);
::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);
}
template <typename T>