diff libinterp/octave-value/ov-lazy-idx.cc @ 20131:0d56160e346d

make printf of lazy-index object work again (bug #44864) * ov-lazy-idx.h, ov-lazy-idx.cc (octave_lazy_index::fast_elem_extract): New function.
author John W. Eaton <jwe@octave.org>
date Sat, 25 Apr 2015 13:18:02 -0400
parents 4197fc428c7d
children
line wrap: on
line diff
--- a/libinterp/octave-value/ov-lazy-idx.cc	Sat Apr 25 12:17:51 2015 -0400
+++ b/libinterp/octave-value/ov-lazy-idx.cc	Sat Apr 25 13:18:02 2015 -0400
@@ -70,6 +70,12 @@
 }
 
 octave_value
+octave_lazy_index::fast_elem_extract (octave_idx_type n) const
+{
+  return double (index.checkelem (n) + 1);
+}
+
+octave_value
 octave_lazy_index::reshape (const dim_vector& new_dims) const
 {
   return idx_vector (index.as_array ().reshape (new_dims),