Mercurial > hg > octave-jordi
diff liboctave/array/Array-util.cc @ 21018:8a65589d1a42
maint: Dereference current_liboctave_error_handler before calling.
For conformity with the rest of liboctave,
call (*current_liboctave_error_handler) (...).
* Array-util.cc, idx-vector.cc, cmd-edit.cc,
singleton-cleanup.cc:
Dereference current_liboctave_error_handler before calling.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 30 Dec 2015 13:16:43 -0800 (2015-12-30) |
parents | 7b6d8c19dab0 |
children |
line wrap: on
line diff
--- a/liboctave/array/Array-util.cc +++ b/liboctave/array/Array-util.cc @@ -555,7 +555,8 @@ if (clen < 0) clen = idx.length (n); else if (clen != idx.length (n)) - current_liboctave_error_handler ("sub2ind: lengths of indices must match"); + (*current_liboctave_error_handler) + ("sub2ind: lengths of indices must match"); if (idx.extent (n) > n) gripe_index_out_of_range (len, i+1, idx.extent (n), n); @@ -613,7 +614,7 @@ } } else - current_liboctave_error_handler ("sub2ind: needs at least 2 indices"); + (*current_liboctave_error_handler) ("sub2ind: needs at least 2 indices"); return retval; } @@ -627,7 +628,7 @@ octave_idx_type numel = dv.numel (); if (idx.extent (numel) > numel) - current_liboctave_error_handler ("ind2sub: index out of range"); + (*current_liboctave_error_handler) ("ind2sub: index out of range"); else { if (idx.is_scalar ())