diff src/graphics.cc @ 8503:8ba2ee57c594

remove qsort in favor of sort
author Jaroslav Hajek <highegg@gmail.com>
date Tue, 13 Jan 2009 12:16:21 +0100
parents 448188853722
children ab82e19002c4
line wrap: on
line diff
--- a/src/graphics.cc	Tue Jan 13 09:34:43 2009 +0100
+++ b/src/graphics.cc	Tue Jan 13 12:16:21 2009 +0100
@@ -1520,15 +1520,6 @@
 }
 // ---------------------------------------------------------------------
 
-static int
-compare (const void *a_arg, const void *b_arg)
-{
-  double a = *(static_cast<const double *> (a_arg));
-  double b = *(static_cast<const double *> (b_arg));
-
-  return a > b ? 1 : (a < b) ? -1 : 0;
-}
-
 static Matrix
 maybe_set_children (const Matrix& kids, const octave_value& val)
 {
@@ -1543,8 +1534,8 @@
 	  Matrix t1 = kids;
 	  Matrix t2 = new_kids;
 
-	  t1.qsort (compare);
-	  t2.qsort (compare);
+	  t1.sort ();
+	  t2.sort ();
 
 	  if (t1 != t2)
 	    ok = false;