Mercurial > forge
changeset 11389:cd6c7bb4a72d octave-forge
bwlabeln: avoid using "or" and "and" keywords (Bug #7926)
author | carandraug |
---|---|
date | Tue, 15 Jan 2013 17:08:42 +0000 |
parents | 839bcab7ed5f |
children | 2e1408e9aedc |
files | main/image/src/bwlabeln.cc |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/main/image/src/bwlabeln.cc Mon Jan 14 17:12:54 2013 +0000 +++ b/main/image/src/bwlabeln.cc Tue Jan 15 17:08:42 2013 +0000 @@ -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);