Mercurial > hg > octave-nkf
changeset 11991:1e640b3de2ad release-3-2-x
simplify octave_cell::sort
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Fri, 12 Jun 2009 10:47:29 +0200 |
parents | 64759142814d |
children | 6c6e0d81148b |
files | src/ChangeLog src/ov-cell.cc |
diffstat | 2 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2009-06-12 Jaroslav Hajek <highegg@gmail.com> + + * ov-cell.cc (octave_cell::sort (Array<octave_idx_type>&)): Simplify. + 2009-06-10 John W. Eaton <jwe@octave.org> * pt-fcn-handle.cc (tree_anon_fcn_handle::dup): Don't convert to
--- a/src/ov-cell.cc +++ b/src/ov-cell.cc @@ -487,11 +487,8 @@ tmp = tmp.sort (sidx, 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");