changeset 5147:47e4c91e5799

[project @ 2005-02-16 21:06:19 by jwe]
author jwe
date Wed, 16 Feb 2005 21:06:19 +0000
parents 275a95541831
children 9eab94f5fadf
files src/ChangeLog src/ov-base-mat.h src/ov.cc src/ov.h
diffstat 4 files changed, 17 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Feb 16 19:18:32 2005 +0000
+++ b/src/ChangeLog	Wed Feb 16 21:06:19 2005 +0000
@@ -1,8 +1,7 @@
 2005-02-16  John W. Eaton  <jwe@octave.org>
 
-	* ov.h, ov.cc
-	(octave_value::octave_value (const ArrayN<octave_value>&, bool)):
-	Delete.
+	* ov-base-mat.h (octave_base_matrix::squeeze): Explicitly convert
+	result of matrix.squeeze() to MT.
 
 2005-02-15  John W. Eaton  <jwe@octave.org>
 
--- a/src/ov-base-mat.h	Wed Feb 16 19:18:32 2005 +0000
+++ b/src/ov-base-mat.h	Wed Feb 16 21:06:19 2005 +0000
@@ -68,7 +68,7 @@
 
   size_t byte_size (void) const { return matrix.byte_size (); }
 
-  octave_value squeeze (void) const { return matrix.squeeze (); }
+  octave_value squeeze (void) const { return MT (matrix.squeeze ()); }
 
   octave_value subsref (const std::string& type,
 			const std::list<octave_value_list>& idx);
--- a/src/ov.cc	Wed Feb 16 19:18:32 2005 +0000
+++ b/src/ov.cc	Wed Feb 16 21:06:19 2005 +0000
@@ -423,6 +423,19 @@
   rep->count = 1;
 }
 
+octave_value::octave_value (const ArrayN<octave_value>& a, bool is_csl)
+  : rep (0)
+{
+  Cell c (a);
+
+  if (is_csl)
+    rep = new octave_cs_list (c);
+  else
+    rep = new octave_cell (c);
+
+  rep->count = 1;
+}
+
 octave_value::octave_value (const Matrix& m)
   : rep (new octave_matrix (m))
 {
--- a/src/ov.h	Wed Feb 16 19:18:32 2005 +0000
+++ b/src/ov.h	Wed Feb 16 21:06:19 2005 +0000
@@ -189,6 +189,7 @@
 
   octave_value (octave_time t);
   octave_value (double d);
+  octave_value (const ArrayN<octave_value>& a, bool is_cs_list = false);
   octave_value (const Cell& c, bool is_cs_list = false);
   octave_value (const Matrix& m);
   octave_value (const NDArray& nda);