Mercurial > octave
diff liboctave/idx-vector.h @ 10285:22a7913bbeb5
optimize return values of find and sort
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Tue, 09 Feb 2010 12:56:47 +0100 |
parents | 3a8c13b71612 |
children | cbc402e64d83 |
line wrap: on
line diff
--- a/liboctave/idx-vector.h Tue Feb 09 11:43:03 2010 +0100 +++ b/liboctave/idx-vector.h Tue Feb 09 12:56:47 2010 +0100 @@ -287,6 +287,9 @@ // Zero-based constructor. idx_vector_rep (const Array<octave_idx_type>& inda); + idx_vector_rep (const Array<octave_idx_type>& inda, + octave_idx_type _ext, direct); + template <class T> idx_vector_rep (const Array<T>&); @@ -473,6 +476,11 @@ : rep (new idx_vector_rep (inda)) { chkerr (); } + // Directly pass extent, no checking. + idx_vector (const Array<octave_idx_type>& inda, octave_idx_type ext) + : rep (new idx_vector_rep (inda, ext, DIRECT)) + { } + // Colon is best constructed by simply copying (or referencing) this member. static const idx_vector colon;