Mercurial > octave-nkf
diff libinterp/octave-value/ov-ch-mat.h @ 19350:6c9ea5be96bf
Change charMatrix to subclass charNDArray rather than be another Array<char>.
* chMatrix.h: both charMatrix and charNDArray are Array<char>, the first
being simply 2 dimensional. We change this so that charMatrix inherits from
charNDArray instead.
* chMatrix.cc: remove all constructors which are now inherited from
charNDArray.
* chNDArray.h, chNDArray.cc: implement all constructors here rather than
calling charMatrix. Remove matrix_value() since a charMatrix constructor is
now enough.
* pr-output.cc, octave-value/ov-ch-mat.h, octave-value/ov-str-mat.cc:
replace calls to charNDArray::matrix_value () with the charMatrix constructor.
author | Carnë Draug <carandraug@octave.org> |
---|---|
date | Fri, 24 Oct 2014 01:31:53 +0100 |
parents | e473c4853afc |
children | 76478d2da117 |
line wrap: on
line diff
--- a/libinterp/octave-value/ov-ch-mat.h Mon Oct 20 01:34:52 2014 +0100 +++ b/libinterp/octave-value/ov-ch-mat.h Fri Oct 24 01:31:53 2014 +0100 @@ -107,10 +107,10 @@ { return float_value (frc_str_conv); } Matrix matrix_value (bool = false) const - { return Matrix (matrix.matrix_value ()); } + { return Matrix (charMatrix (matrix)); } FloatMatrix float_matrix_value (bool = false) const - { return FloatMatrix (matrix.matrix_value ()); } + { return FloatMatrix (charMatrix (matrix)); } NDArray array_value (bool = false) const { return NDArray (matrix); } @@ -123,10 +123,10 @@ FloatComplex float_complex_value (bool = false) const; ComplexMatrix complex_matrix_value (bool = false) const - { return ComplexMatrix (matrix.matrix_value ()); } + { return ComplexMatrix (charMatrix (matrix)); } FloatComplexMatrix float_complex_matrix_value (bool = false) const - { return FloatComplexMatrix (matrix.matrix_value ()); } + { return FloatComplexMatrix (charMatrix (matrix)); } ComplexNDArray complex_array_value (bool = false) const { return ComplexNDArray (matrix); } @@ -135,7 +135,7 @@ { return FloatComplexNDArray (matrix); } charMatrix char_matrix_value (bool = false) const - { return matrix.matrix_value (); } + { return charMatrix (matrix); } charNDArray char_array_value (bool = false) const { return matrix; }