Mercurial > hg > octave-nkf
changeset 15430:21467c7fc08f
Deprecate DiagArray2<T>::diag
* DiagArray2.cc (DiagArray2<T>::[diag, extract_diag]): Exchange these
two functions.
* DiagArray2.h (DiagArray2<T>::diag): Add GCC_ATTR_DEPRECATED
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Fri, 21 Sep 2012 17:31:25 -0400 |
parents | 4db96357fec9 |
children | 3e101e8b3dac |
files | liboctave/array/DiagArray2.cc liboctave/array/DiagArray2.h |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/array/DiagArray2.cc +++ b/liboctave/array/DiagArray2.cc @@ -48,14 +48,14 @@ template <class T> Array<T> -DiagArray2<T>::extract_diag (octave_idx_type k) const +DiagArray2<T>::diag (octave_idx_type k) const { - return diag (k); + return extract_diag (k); } template <class T> Array<T> -DiagArray2<T>::diag (octave_idx_type k) const +DiagArray2<T>::extract_diag (octave_idx_type k) const { Array<T> d;
--- a/liboctave/array/DiagArray2.h +++ b/liboctave/array/DiagArray2.h @@ -97,7 +97,7 @@ dim_vector dims (void) const { return dim_vector (d1, d2); } - Array<T> diag (octave_idx_type k = 0) const; + Array<T> diag (octave_idx_type k = 0) GCC_ATTR_DEPRECATED const; Array<T> extract_diag (octave_idx_type k = 0) const; DiagArray2<T> build_diag_matrix () const {