changeset 9686:5e433877634f

don't store MatrixType with scalars
author Jaroslav Hajek <highegg@gmail.com>
date Fri, 02 Oct 2009 11:15:02 +0200
parents e793865ede63
children 86aa08bbc887
files src/ChangeLog src/ov-base-scalar.h
diffstat 2 files changed, 13 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Fri Oct 02 08:27:44 2009 +0200
+++ b/src/ChangeLog	Fri Oct 02 11:15:02 2009 +0200
@@ -1,3 +1,9 @@
+2009-10-02  Jaroslav Hajek  <highegg@gmail.com>
+
+	* ov-base-scalar.h (octave_base_scalar::matrix_type): Always
+	return MatrixType::Diagonal.
+	(octave_base_scalar::typ): Remove.
+
 2009-10-02  Jaroslav Hajek  <highegg@gmail.com>
 
 	* ov.h: Define also diag matrix extractors.
--- a/src/ov-base-scalar.h	Fri Oct 02 08:27:44 2009 +0200
+++ b/src/ov-base-scalar.h	Fri Oct 02 11:15:02 2009 +0200
@@ -47,13 +47,13 @@
 public:
 
   octave_base_scalar (void)
-    : octave_base_value (), typ (MatrixType ()) { }
+    : octave_base_value () { }
 
-  octave_base_scalar (const ST& s, const MatrixType& t = MatrixType ())
-    : octave_base_value (), scalar (s), typ (t) { }
+  octave_base_scalar (const ST& s)
+    : octave_base_value (), scalar (s) { }
 
   octave_base_scalar (const octave_base_scalar& s)
-    : octave_base_value (), scalar (s.scalar), typ (s.typ) { }
+    : octave_base_value (), scalar (s.scalar) { }
 
   ~octave_base_scalar (void) { }
 
@@ -117,9 +117,9 @@
   sortmode is_sorted_rows (sortmode mode = UNSORTED) const
     { return mode ? mode : ASCENDING; }
 
-  MatrixType matrix_type (void) const { return typ; }
-  MatrixType matrix_type (const MatrixType& _typ) const
-    { MatrixType ret = typ; typ = _typ; return ret; }
+  MatrixType matrix_type (void) const { return MatrixType::Diagonal; }
+  MatrixType matrix_type (const MatrixType&) const
+    { return matrix_type (); }
 
   bool is_scalar_type (void) const { return true; }
 
@@ -141,8 +141,6 @@
 
   // The value of this scalar.
   ST scalar;
-
-  mutable MatrixType typ;
 };
 
 #endif