Mercurial > octave
changeset 21337:cfe11042fbc0
eliminate useless assignment in for loop
* Sparse.cc (Sparse<T>::SparseRep::maybe_compress,
Sparse<T>::SparseRep::resize):
Eliminate useless assignment in for loop.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 24 Feb 2016 12:21:48 -0500 |
parents | 0dcc99afc25b |
children | 8fc2a9e0d729 |
files | liboctave/array/Sparse.cc |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/array/Sparse.cc Wed Feb 24 12:09:09 2016 -0500 +++ b/liboctave/array/Sparse.cc Wed Feb 24 12:21:48 2016 -0500 @@ -133,7 +133,7 @@ for (octave_idx_type j = 1; j <= ncols; j++) { octave_idx_type u = c[j]; - for (i = i; i < u; i++) + for (; i < u; i++) if (d[i] != T ()) { d[k] = d[i]; @@ -943,7 +943,7 @@ for (octave_idx_type j = 1; j <= rep->ncols; j++) { octave_idx_type u = xcidx (j); - for (i = i; i < u; i++) + for (; i < u; i++) if (xridx (i) < r) { xdata (k) = xdata (i);