Mercurial > octave
diff src/ov-intx.h @ 9606:a04352386a6b
clear index cache on ++,-- operators
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Thu, 03 Sep 2009 06:59:53 +0200 |
parents | d4b1314a7c31 |
children | 1be3c73ed7b5 |
line wrap: on
line diff
--- a/src/ov-intx.h Wed Sep 02 13:11:06 2009 -0400 +++ b/src/ov-intx.h Thu Sep 03 06:59:53 2009 +0200 @@ -299,9 +299,10 @@ return retval; } + // Use matrix_ref here to clear index cache. void increment (void) { - matrix += OCTAVE_INT_T (1); + matrix_ref() += OCTAVE_INT_T (1); if (OCTAVE_INT_T::get_math_trunc_flag ()) gripe_unop_integer_math_truncated ("++", type_name (). c_str ()); @@ -310,7 +311,7 @@ void decrement (void) { - matrix -= OCTAVE_INT_T (1); + matrix_ref() -= OCTAVE_INT_T (1); if (OCTAVE_INT_T::get_math_trunc_flag ()) gripe_unop_integer_math_truncated ("--", type_name (). c_str ()); OCTAVE_INT_T::clear_conv_flag ();