diff src/ov-cell.cc @ 8825:c3445f1c8cb4

reuse cellstr cache in strcmp
author Jaroslav Hajek <highegg@gmail.com>
date Fri, 20 Feb 2009 10:55:03 +0100
parents 76ddf0ab985d
children eb63fbe60fab
line wrap: on
line diff
--- a/src/ov-cell.cc	Fri Feb 20 07:53:47 2009 +0100
+++ b/src/ov-cell.cc	Fri Feb 20 10:55:03 2009 +0100
@@ -459,11 +459,8 @@
 
       tmp = tmp.sort (dim, mode);
 
-      // We do it the hard way to auto-create the result's cache
-      octave_cell *result = new octave_cell (Cell (tmp));
-      result->cellstr_cache = tmp;
-
-      retval = result;
+      // We already have the cache.
+      retval = new octave_cell (tmp);
     }
   else
     error ("sort: only cell arrays of character strings may be sorted");