Mercurial > hg > octave-nkf
diff liboctave/array/dSparse.cc @ 17812:fffd0c0ca2dc
maint: A few Octave coding convention tweaks
* libinterp/corefcn/rand.cc: Use space before parentheses in %!test function call.
* liboctave/array/CSparse.cc: Change "found [...]" to "found[...]".
* liboctave/array/dSparse.cc: Change "found [...]" to "found[...]".
Use space before parentheses in %!test function call.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 30 Oct 2013 21:55:14 -0700 |
parents | 49a5a4be04a1 |
children | 35464baa7d99 |
line wrap: on
line diff
--- a/liboctave/array/dSparse.cc +++ b/liboctave/array/dSparse.cc @@ -357,16 +357,16 @@ OCTAVE_LOCAL_BUFFER (octave_idx_type, found, nr); for (octave_idx_type i = 0; i < nr; i++) - found [i] = 0; + found[i] = 0; for (octave_idx_type j = 0; j < nc; j++) for (octave_idx_type i = cidx(j); i < cidx(j+1); i++) - if (found [ridx (i)] == -j) - found [ridx (i)] = -j - 1; + if (found[ridx (i)] == -j) + found[ridx (i)] = -j - 1; for (octave_idx_type i = 0; i < nr; i++) - if (found [i] > -nc && found [i] < 0) - idx_arg.elem (i) = -found [i]; + if (found[i] > -nc && found[i] < 0) + idx_arg.elem (i) = -found[i]; for (octave_idx_type j = 0; j < nc; j++) { @@ -508,16 +508,16 @@ OCTAVE_LOCAL_BUFFER (octave_idx_type, found, nr); for (octave_idx_type i = 0; i < nr; i++) - found [i] = 0; + found[i] = 0; for (octave_idx_type j = 0; j < nc; j++) for (octave_idx_type i = cidx(j); i < cidx(j+1); i++) - if (found [ridx (i)] == -j) - found [ridx (i)] = -j - 1; + if (found[ridx (i)] == -j) + found[ridx (i)] = -j - 1; for (octave_idx_type i = 0; i < nr; i++) - if (found [i] > -nc && found [i] < 0) - idx_arg.elem (i) = -found [i]; + if (found[i] > -nc && found[i] < 0) + idx_arg.elem (i) = -found[i]; for (octave_idx_type j = 0; j < nc; j++) { @@ -677,8 +677,8 @@ /* -%!assert(nnz(real(sparse([1i,1]))),1) -%!assert(nnz(real(sparse([1i,1]))),1) +%!assert (nnz (real (sparse ([1i,1]))), 1) +%!assert (nnz (real (sparse ([1i,1]))), 1) */