diff src/ov.cc @ 9689:34d6f005db4b

eliminate is_string argument from octave_value character array constructors
author John W. Eaton <jwe@octave.org>
date Mon, 05 Oct 2009 00:11:07 -0400
parents afcf852256d2
children f42f0d707e8e
line wrap: on
line diff
--- a/src/ov.cc	Sun Oct 04 01:04:29 2009 -0400
+++ b/src/ov.cc	Mon Oct 05 00:11:07 2009 -0400
@@ -810,32 +810,50 @@
   maybe_mutate ();
 }
 
-octave_value::octave_value (const charMatrix& chm, bool is_str, char type)
-  : rep (is_str
-	 ? (type == '"'
-	    ? new octave_char_matrix_dq_str (chm)
-	    : new octave_char_matrix_sq_str (chm))
-	 : new octave_char_matrix (chm))
+octave_value::octave_value (const charMatrix& chm, char type)
+  : rep (type == '"'
+	 ? new octave_char_matrix_dq_str (chm)
+	 : new octave_char_matrix_sq_str (chm))
+{
+  maybe_mutate ();
+}
+
+octave_value::octave_value (const charNDArray& chm, char type)
+  : rep (type == '"'
+	 ? new octave_char_matrix_dq_str (chm)
+	 : new octave_char_matrix_sq_str (chm))
 {
   maybe_mutate ();
 }
 
-octave_value::octave_value (const charNDArray& chm, bool is_str, char type)
-  : rep (is_str
-	 ? (type == '"'
-	    ? new octave_char_matrix_dq_str (chm)
-	    : new octave_char_matrix_sq_str (chm))
-	 : new octave_char_matrix (chm))
+octave_value::octave_value (const ArrayN<char>& chm, char type)
+  : rep (type == '"'
+	 ? new octave_char_matrix_dq_str (chm)
+	 : new octave_char_matrix_sq_str (chm))
 {
   maybe_mutate ();
 }
 
-octave_value::octave_value (const ArrayN<char>& chm, bool is_str, char type)
-  : rep (is_str
-	 ? (type == '"'
-	    ? new octave_char_matrix_dq_str (chm)
-	    : new octave_char_matrix_sq_str (chm))
-	 : new octave_char_matrix (chm))
+octave_value::octave_value (const charMatrix& chm, bool, char type)
+  : rep (type == '"'
+	 ? new octave_char_matrix_dq_str (chm)
+	 : new octave_char_matrix_sq_str (chm))
+{
+  maybe_mutate ();
+}
+
+octave_value::octave_value (const charNDArray& chm, bool, char type)
+  : rep (type == '"'
+	 ? new octave_char_matrix_dq_str (chm)
+	 : new octave_char_matrix_sq_str (chm))
+{
+  maybe_mutate ();
+}
+
+octave_value::octave_value (const ArrayN<char>& chm, bool, char type)
+  : rep (type == '"'
+	 ? new octave_char_matrix_dq_str (chm)
+	 : new octave_char_matrix_sq_str (chm))
 {
   maybe_mutate ();
 }