Mercurial > hg > octave-lyh
diff liboctave/DiagArray2.cc @ 11574:a83bad07f7e3
attempt better backward compatibility for Array resize functions
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 20 Jan 2011 00:12:05 -0500 |
parents | 57632dea2446 |
children | 72c96de7a403 |
line wrap: on
line diff
--- a/liboctave/DiagArray2.cc +++ b/liboctave/DiagArray2.cc @@ -37,12 +37,13 @@ #include "lo-error.h" template <class T> -DiagArray2<T>::DiagArray2 (const Array<T>& a, octave_idx_type r, octave_idx_type c) +DiagArray2<T>::DiagArray2 (const Array<T>& a, octave_idx_type r, + octave_idx_type c) : Array<T> (a.as_column ()), d1 (r), d2 (c) { octave_idx_type rcmin = std::min (r, c); if (rcmin != a.length ()) - Array<T>::resize (rcmin, 1); + Array<T>::resize (dim_vector (rcmin, 1)); } template <class T> @@ -106,7 +107,7 @@ if (r != dim1 () || c != dim2 ()) { - Array<T>::resize (std::min (r, c), 1, rfv); + Array<T>::resize (dim_vector (std::min (r, c), 1), rfv); d1 = r; d2 = c; } }