Revert "[vector] Simplify Sort" and "More of the same"
authorBehdad Esfahbod <behdad@behdad.org>
Tue, 16 Oct 2018 20:32:52 +0000 (13:32 -0700)
committerBehdad Esfahbod <behdad@behdad.org>
Tue, 16 Oct 2018 20:33:14 +0000 (13:33 -0700)
This reverts commit de0b9a466490c2c13d6ec6f59d5122b0a87d3180.
This reverts commit 921f0e6ec722940a1e37660e1291aa69f9f39db8.

Annnnd, revert.  MSVC doesn't like it.

src/hb-vector.hh

index 9c2f724..766e5fb 100644 (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>