Mercurial > hg > octave-nkf
changeset 6817:2e7f62e52c13
[project @ 2007-08-19 19:36:40 by dbateman]
author | dbateman |
---|---|
date | Sun, 19 Aug 2007 19:36:40 +0000 |
parents | ec4c1dfb985a |
children | 9483da8d87e5 |
files | liboctave/ChangeLog liboctave/Sparse.cc |
diffstat | 2 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,7 @@ +2007-08-19 David Bateman <dbateman@free.fr> + + * Sparse.cc (Sparse<T>::permute): Avoid shadowing warning. + 2007-08-14 John W. Eaton <jwe@octave.org> * Sparse.cc (Sparse<T>::permute): permutation vector is zero based.
--- a/liboctave/Sparse.cc +++ b/liboctave/Sparse.cc @@ -787,14 +787,14 @@ // The only valid permutations of a sparse array are [1, 2] and [2, 1]. bool fail = false; - bool transpose = false; + bool trans = false; if (perm_vec.length () == 2) { if (perm_vec(0) == 0 && perm_vec(1) == 1) /* do nothing */; else if (perm_vec(0) == 1 && perm_vec(1) == 0) - transpose = true; + trans = true; else fail = true; } @@ -805,7 +805,7 @@ (*current_liboctave_error_handler) ("permutation vector contains an invalid element"); - return transpose ? this->transpose () : *this; + return trans ? this->transpose () : *this; } template <class T>