changeset 2419:cd41a9562cee octave-forge

Fix for 2.9.x change to do_index method
author adb014
date Mon, 28 Aug 2006 20:03:09 +0000
parents 12c8f1381eaa
children c180a44e2c7f
files main/comm/src/ov-galois.cc main/comm/src/ov-galois.h main/fixed/src/ov-fixed-complex.cc main/fixed/src/ov-fixed-complex.h main/fixed/src/ov-fixed-cx-mat.cc main/fixed/src/ov-fixed-cx-mat.h main/fixed/src/ov-fixed-mat.cc main/fixed/src/ov-fixed-mat.h main/fixed/src/ov-fixed.cc main/fixed/src/ov-fixed.h
diffstat 10 files changed, 25 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/main/comm/src/ov-galois.cc	Sun Aug 27 20:17:17 2006 +0000
+++ b/main/comm/src/ov-galois.cc	Mon Aug 28 20:03:09 2006 +0000
@@ -96,7 +96,7 @@
 
 octave_value
 octave_galois::do_index_op (const octave_value_list& idx,
-			    int resize_ok)
+			    bool resize_ok)
 {
   octave_value retval;
 
--- a/main/comm/src/ov-galois.h	Sun Aug 27 20:17:17 2006 +0000
+++ b/main/comm/src/ov-galois.h	Mon Aug 28 20:03:09 2006 +0000
@@ -71,7 +71,7 @@
 			const std::list<octave_value_list>& idx);
 
   octave_value do_index_op (const octave_value_list& idx,
-			    int resize_ok);
+			    bool resize_ok);
 
   octave_value do_index_op (const octave_value_list& idx)
     { return do_index_op (idx, 0); }
--- a/main/fixed/src/ov-fixed-complex.cc	Sun Aug 27 20:17:17 2006 +0000
+++ b/main/fixed/src/ov-fixed-complex.cc	Mon Aug 28 20:03:09 2006 +0000
@@ -188,7 +188,7 @@
 }
 
 octave_value
-octave_fixed_complex::do_index_op (const octave_value_list& idx, int resize_ok)
+octave_fixed_complex::do_index_op (const octave_value_list& idx, bool resize_ok)
 {
   octave_value retval;
 
--- a/main/fixed/src/ov-fixed-complex.h	Sun Aug 27 20:17:17 2006 +0000
+++ b/main/fixed/src/ov-fixed-complex.h	Mon Aug 28 20:03:09 2006 +0000
@@ -117,7 +117,8 @@
 
   OV_REP_TYPE *try_narrowing_conversion (void);
 
-  octave_value do_index_op (const octave_value_list& idx, int resize_ok = 0);
+  octave_value do_index_op (const octave_value_list& idx,
+			    bool resize_ok = false);
 
   FixedPoint fixed_value (bool = false) const ;
   FixedPointComplex fixed_complex_value (bool = false) const { return scalar; }
--- a/main/fixed/src/ov-fixed-cx-mat.cc	Sun Aug 27 20:17:17 2006 +0000
+++ b/main/fixed/src/ov-fixed-cx-mat.cc	Mon Aug 28 20:03:09 2006 +0000
@@ -118,7 +118,7 @@
 
 FixedComplexMatrix
 octave_fixed_complex_matrix::do_index_intern (const octave_value_list& idx,
-				     int resize_ok)
+				     bool resize_ok)
 {
   FixedComplexMatrix retval;
 
@@ -156,7 +156,7 @@
 
 octave_value
 octave_fixed_complex_matrix::do_index_op (const octave_value_list& idx,
-				     int resize_ok)
+				     bool resize_ok)
 {
   octave_value retval;
 
@@ -199,13 +199,13 @@
 	    else if (key == __FIXED_DECSIZE_STR) {
 	      if (rhs.is_matrix_type()) {
 		FixedComplexMatrix old_matrix = 
-		  do_index_intern(idx.front(), 0);
+		  do_index_intern(idx.front());
 		octave_value new_matrix = new octave_fixed_complex_matrix(
 		    old_matrix.chdecsize(rhs.complex_matrix_value()));
 		retval = numeric_assign (type, idx, new_matrix);
 	      } else {
 		FixedComplexMatrix old_matrix = 
-		  do_index_intern(idx.front(), 0);
+		  do_index_intern(idx.front());
 		octave_value new_matrix = new octave_fixed_complex_matrix(
 		    old_matrix.chdecsize(rhs.complex_value()));
 		retval = numeric_assign (type, idx, new_matrix);
@@ -213,13 +213,13 @@
 	    } else if (key == __FIXED_INTSIZE_STR) {
 	      if (rhs.is_matrix_type()) {
 		FixedComplexMatrix old_matrix = 
-		  do_index_intern(idx.front(), 0);
+		  do_index_intern(idx.front());
 		octave_value new_matrix = new octave_fixed_complex_matrix(
 		    old_matrix.chintsize(rhs.complex_matrix_value()));
 		retval = numeric_assign (type, idx, new_matrix);
 	      } else {
 		FixedComplexMatrix old_matrix = 
-		  do_index_intern(idx.front(), 0);
+		  do_index_intern(idx.front());
 		octave_value new_matrix = new octave_fixed_complex_matrix(
 		    old_matrix.chintsize(rhs.complex_value()));
 		retval = numeric_assign (type, idx, new_matrix);
--- a/main/fixed/src/ov-fixed-cx-mat.h	Sun Aug 27 20:17:17 2006 +0000
+++ b/main/fixed/src/ov-fixed-cx-mat.h	Mon Aug 28 20:03:09 2006 +0000
@@ -86,7 +86,7 @@
     { return do_index_op (idx, 0); }
 
   octave_value do_index_op (const octave_value_list& idx,
-			    int resize_ok);
+			    bool resize_ok = false);
 
   octave_value subsasgn (const std::string& type,
 			 const std::list<octave_value_list>& idx,
@@ -147,7 +147,7 @@
 
 private:
   FixedComplexMatrix do_index_intern (const octave_value_list& idx, 
-				      int resize_ok);
+				      bool resize_ok = false);
 
   DECLARE_OCTAVE_ALLOCATOR
 
--- a/main/fixed/src/ov-fixed-mat.cc	Sun Aug 27 20:17:17 2006 +0000
+++ b/main/fixed/src/ov-fixed-mat.cc	Mon Aug 28 20:03:09 2006 +0000
@@ -107,7 +107,7 @@
 
 FixedMatrix
 octave_fixed_matrix::do_index_intern (const octave_value_list& idx,
-				     int resize_ok)
+				     bool resize_ok)
 {
   FixedMatrix retval;
 
@@ -146,7 +146,7 @@
 
 octave_value
 octave_fixed_matrix::do_index_op (const octave_value_list& idx,
-				     int resize_ok)
+				     bool resize_ok)
 {
   octave_value retval;
 
@@ -189,24 +189,24 @@
 	      error("can not directly change the value of a fixed structure");
 	    else if (key == __FIXED_DECSIZE_STR) {
 	      if (rhs.is_matrix_type()) {
-		FixedMatrix old_matrix = do_index_intern(idx.front(), 0);
+		FixedMatrix old_matrix = do_index_intern(idx.front());
 		octave_value new_matrix = new octave_fixed_matrix(
 		    old_matrix.chdecsize(rhs.matrix_value()));
 		retval = numeric_assign (type, idx, new_matrix);
 	      } else {
-		FixedMatrix old_matrix = do_index_intern(idx.front(), 0);
+		FixedMatrix old_matrix = do_index_intern(idx.front());
 		octave_value new_matrix = new octave_fixed_matrix(
 		    old_matrix.chdecsize(rhs.double_value()));
 		retval = numeric_assign (type, idx, new_matrix);
 	      }
 	    } else if (key == __FIXED_INTSIZE_STR) {
 	      if (rhs.is_matrix_type()) {
-		FixedMatrix old_matrix = do_index_intern(idx.front(), 0);
+		FixedMatrix old_matrix = do_index_intern(idx.front());
 		octave_value new_matrix = new octave_fixed_matrix(
 		    old_matrix.chintsize(rhs.matrix_value()));
 		retval = numeric_assign (type, idx, new_matrix);
 	      } else {
-		FixedMatrix old_matrix = do_index_intern(idx.front(), 0);
+		FixedMatrix old_matrix = do_index_intern(idx.front());
 		octave_value new_matrix = new octave_fixed_matrix(
 		    old_matrix.chintsize(rhs.double_value()));
 		retval = numeric_assign (type, idx, new_matrix);
--- a/main/fixed/src/ov-fixed-mat.h	Sun Aug 27 20:17:17 2006 +0000
+++ b/main/fixed/src/ov-fixed-mat.h	Mon Aug 28 20:03:09 2006 +0000
@@ -87,7 +87,7 @@
     { return do_index_op (idx, 0); }
 
   octave_value do_index_op (const octave_value_list& idx,
-			    int resize_ok);
+			    bool resize_ok = false);
 
   octave_value subsasgn (const std::string& type,
 			 const std::list<octave_value_list>& idx,
@@ -147,7 +147,8 @@
 #endif
 
 private:
-  FixedMatrix do_index_intern (const octave_value_list& idx, int resize_ok);
+  FixedMatrix do_index_intern (const octave_value_list& idx, 
+			       bool resize_ok = false);
 
   DECLARE_OCTAVE_ALLOCATOR
 
--- a/main/fixed/src/ov-fixed.cc	Sun Aug 27 20:17:17 2006 +0000
+++ b/main/fixed/src/ov-fixed.cc	Mon Aug 28 20:03:09 2006 +0000
@@ -162,7 +162,7 @@
 }
 
 octave_value
-octave_fixed::do_index_op (const octave_value_list& idx, int resize_ok)
+octave_fixed::do_index_op (const octave_value_list& idx, bool resize_ok)
 {
   octave_value retval;
 
--- a/main/fixed/src/ov-fixed.h	Sun Aug 27 20:17:17 2006 +0000
+++ b/main/fixed/src/ov-fixed.h	Mon Aug 28 20:03:09 2006 +0000
@@ -100,7 +100,8 @@
   OV_REP_TYPE *clone (void) const { return new octave_fixed (*this); }
   OV_REP_TYPE *empty_clone (void) const { return new octave_fixed (); }
 
-  octave_value do_index_op (const octave_value_list& idx, int resize_ok = 0);
+  octave_value do_index_op (const octave_value_list& idx, 
+			    bool resize_ok = false);
   idx_vector index_vector (void) const 
     { return idx_vector (::fixedpoint(scalar)); }