diff src/ov-flt-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 d4b1314a7c31
children 1be3c73ed7b5
line wrap: on
line diff
--- a/src/ov-flt-re-mat.h
+++ b/src/ov-flt-re-mat.h
@@ -163,9 +163,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;