Mercurial > octave-libgccjit
diff liboctave/Array.h @ 2109:356f70c8fcbd
[project @ 1996-04-30 12:31:30 by jwe]
author | jwe |
---|---|
date | Tue, 30 Apr 1996 12:31:30 +0000 |
parents | 2b67abb63030 |
children | 2fbf9bb1cd7a |
line wrap: on
line diff
--- a/liboctave/Array.h Tue Apr 30 10:44:44 1996 +0000 +++ b/liboctave/Array.h Tue Apr 30 12:31:30 1996 +0000 @@ -31,8 +31,6 @@ #include <cassert> #include <cstdlib> -#include "lo-error.h" - class idx_vector; // For now, define this here if it is not already defined. Not doing @@ -176,11 +174,7 @@ T& Array<T>::checkelem (int n) { if (n < 0 || n >= rep->length ()) - { - (*current_liboctave_error_handler) ("range error"); - static T foo; - return foo; - } + return range_error ("T& Array<T>::checkelem", n); else { make_unique (); @@ -194,7 +188,7 @@ T& elem (int n) { make_unique (); - return xelem (); + return xelem (n); } #endif @@ -203,7 +197,7 @@ T Array<T>::checkelem (int n) const { if (n < 0 || n >= rep->length ()) - return range_error (); + return range_error ("T Array<T>::checkelem", n); else return xelem (n); } @@ -236,8 +230,8 @@ return *this; } - T range_error (void) const; - T& range_error (void); + T range_error (const char *fcn, int n) const; + T& range_error (const char *fcn, int n); #ifdef HEAVYWEIGHT_INDEXING void set_max_indices (int mi) { max_indices = mi; }