Mercurial > hg > octave-image
changeset 733:505a90ad7692
bwlabeln: avoid using "or" and "and" keywords (Bug #7926)
author | carandraug |
---|---|
date | Tue, 15 Jan 2013 17:08:42 +0000 |
parents | f8b47a646def |
children | 9e5fe1ff8f26 |
files | src/bwlabeln.cc |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/bwlabeln.cc +++ b/src/bwlabeln.cc @@ -54,13 +54,13 @@ if (na > nb) return false; octave_idx_type i = 0; - while (a(i) == b(i) and i < na) + while (a(i) == b(i) && i < na) { i++; } if (i == na //They're equal, but this is strict order - or a(i) > b(i) ) + || a(i) > b(i) ) return false; return true; @@ -145,7 +145,7 @@ //The zero coordinates are the centre, and the negative ones //are the ones reflected about the centre, and we don't need //to consider those. - if( aidx == zero or neighbours.find(-aidx) != neighbours.end() ) + if( aidx == zero || neighbours.find(-aidx) != neighbours.end() ) continue; neighbours.insert (aidx);