Mercurial > hg > octave-nkf
diff liboctave/array/fCRowVector.cc @ 17663:7975d75f933c
Use std::swap in liboctave instead of temporary variable.
* liboctave/array/CColVector.cc, liboctave/array/CDiagMatrix.cc,
liboctave/array/CMatrix.cc, liboctave/array/CRowVector.cc,
liboctave/array/chMatrix.cc, liboctave/array/dColVector.cc,
liboctave/array/dDiagMatrix.cc, liboctave/array/dMatrix.cc,
liboctave/array/dRowVector.cc, liboctave/array/fCColVector.cc,
liboctave/array/fCDiagMatrix.cc, liboctave/array/fCMatrix.cc,
liboctave/array/fCRowVector.cc, liboctave/array/fColVector.cc,
liboctave/array/fDiagMatrix.cc, liboctave/array/fMatrix.cc,
liboctave/array/fRowVector.cc, liboctave/numeric/sparse-dmsolve.cc:
Use std::swap in liboctave instead of temporary variable.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 15 Oct 2013 14:59:09 -0700 |
parents | 648dabbb4c6b |
children | d63878346099 |
line wrap: on
line diff
--- a/liboctave/array/fCRowVector.cc +++ b/liboctave/array/fCRowVector.cc @@ -160,7 +160,7 @@ return *this; } - if (c1 > c2) { octave_idx_type tmp = c1; c1 = c2; c2 = tmp; } + if (c1 > c2) { std::swap (c1, c2); } if (c2 >= c1) { @@ -184,7 +184,7 @@ return *this; } - if (c1 > c2) { octave_idx_type tmp = c1; c1 = c2; c2 = tmp; } + if (c1 > c2) { std::swap (c1, c2); } if (c2 >= c1) { @@ -242,7 +242,7 @@ FloatComplexRowVector FloatComplexRowVector::extract (octave_idx_type c1, octave_idx_type c2) const { - if (c1 > c2) { octave_idx_type tmp = c1; c1 = c2; c2 = tmp; } + if (c1 > c2) { std::swap (c1, c2); } octave_idx_type new_c = c2 - c1 + 1;