Mercurial > hg > octave-lyh
changeset 10489:d47802f0e557
Back out changeset 4e64fbbd5c58
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Tue, 06 Apr 2010 08:28:15 +0200 |
parents | acf2b099532d |
children | fdccd69d26bd |
files | liboctave/Array-util.cc liboctave/Array-util.h liboctave/ChangeLog liboctave/idx-vector.cc liboctave/idx-vector.h |
diffstat | 5 files changed, 12 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/Array-util.cc +++ b/liboctave/Array-util.cc @@ -708,16 +708,12 @@ } void -gripe_invalid_index (bool err) +gripe_invalid_index (void) { const char *err_id = error_id_invalid_index; - if (err) - (*current_liboctave_error_with_id_handler) - (err_id, "subscript indices must be either positive integers or logicals"); - else - (*current_liboctave_warning_with_id_handler) - (err_id, "non-integer subscripts in index expression"); + (*current_liboctave_error_with_id_handler) + (err_id, "subscript indices must be either positive integers or logicals."); } // FIXME -- the following is a common error message to resize,
--- a/liboctave/Array-util.h +++ b/liboctave/Array-util.h @@ -114,7 +114,7 @@ extern void OCTAVE_API gripe_del_index_out_of_range (bool is1d, octave_idx_type iext, octave_idx_type ext); -extern void OCTAVE_API gripe_invalid_index (bool err = true); +extern void OCTAVE_API gripe_invalid_index (void); extern void OCTAVE_API gripe_invalid_resize (void);
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +2010-04-06 Jaroslav Hajek <highegg@gmail.com> + + * idx-vector.cc, Array-util.h, Array-util.cc: Reverse effects of + 4e64fbbd5c58. + 2010-04-02 John W. Eaton <jwe@octave.org> * Array-util.cc, idx-vector.cc, idx-vector.h: Style fixes.
--- a/liboctave/idx-vector.cc +++ b/liboctave/idx-vector.cc @@ -789,23 +789,6 @@ rep = new idx_mask_rep (bnda, nnz); } -idx_vector::idx_vector (const Range& r) - : rep (0) -{ - if (r.nelem () > 0 && ! r.all_elements_are_ints ()) - { - gripe_invalid_index (false); - - Matrix m = r.matrix_value (); - - rep = new idx_vector_rep (m.map (xround)); - } - else - rep = new idx_range_rep (r); - - chkerr (); -} - bool idx_vector::maybe_reduce (octave_idx_type n, const idx_vector& j, octave_idx_type nj)
--- a/liboctave/idx-vector.h +++ b/liboctave/idx-vector.h @@ -509,7 +509,9 @@ idx_vector (const Array<bool>& nda); - idx_vector (const Range& r); + idx_vector (const Range& r) + : rep (new idx_range_rep (r)) + { chkerr (); } idx_vector (const Sparse<bool>& nda) : rep (new idx_vector_rep (nda)) { chkerr (); }