diff src/ov-re-mat.h @ 9606:a04352386a6b

clear index cache on ++,-- operators
author Jaroslav Hajek <highegg@gmail.com>
date Thu, 03 Sep 2009 06:59:53 +0200
parents d9716e3ee0dd
children 1be3c73ed7b5
line wrap: on
line diff
--- a/src/ov-re-mat.h	Wed Sep 02 13:11:06 2009 -0400
+++ b/src/ov-re-mat.h	Thu Sep 03 06:59:53 2009 +0200
@@ -177,9 +177,10 @@
 
   octave_value diag (octave_idx_type k = 0) const;
 
-  void increment (void) { matrix += 1.0; }
+  // Use matrix_ref here to clear index cache.
+  void increment (void) { matrix_ref () += 1.0; }
 
-  void decrement (void) { matrix -= 1.0; }
+  void decrement (void) { matrix_ref () -= 1.0; }
 
   octave_value convert_to_str_internal (bool pad, bool force, char type) const;