diff options
author | Benjamin Peterson <benjamin@python.org> | 2016-05-24 05:47:50 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2016-05-24 05:47:50 (GMT) |
commit | 5a093c158abda2c1e212c8ccc3cebba30a2a0596 (patch) | |
tree | 66437bb129a686e26cd0ed59bd5dba31100cdb06 /Modules/cjkcodecs/cjkcodecs.h | |
parent | 05d3921cc138ced6b5988c027275a601a6c9fb84 (diff) | |
download | cpython-5a093c158abda2c1e212c8ccc3cebba30a2a0596.zip cpython-5a093c158abda2c1e212c8ccc3cebba30a2a0596.tar.gz cpython-5a093c158abda2c1e212c8ccc3cebba30a2a0596.tar.bz2 |
fix indentation and add curlies (closes #27093)
Diffstat (limited to 'Modules/cjkcodecs/cjkcodecs.h')
-rw-r--r-- | Modules/cjkcodecs/cjkcodecs.h | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/Modules/cjkcodecs/cjkcodecs.h b/Modules/cjkcodecs/cjkcodecs.h index 23642df..b72a3f0 100644 --- a/Modules/cjkcodecs/cjkcodecs.h +++ b/Modules/cjkcodecs/cjkcodecs.h @@ -328,22 +328,26 @@ find_pairencmap(ucs2_t body, ucs2_t modifier, min = 0; max = haystacksize; - for (pos = haystacksize >> 1; min != max; pos = (min + max) >> 1) + for (pos = haystacksize >> 1; min != max; pos = (min + max) >> 1) { if (value < haystack[pos].uniseq) { - if (max == pos) break; - else max = pos; + if (max != pos) { + max = pos; + continue; + } } else if (value > haystack[pos].uniseq) { - if (min == pos) break; - else min = pos; + if (min != pos) { + min = pos; + continue; + } } - else - break; + break; + } - if (value == haystack[pos].uniseq) - return haystack[pos].code; - else - return DBCINV; + if (value == haystack[pos].uniseq) { + return haystack[pos].code; + } + return DBCINV; } #endif |