Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5a093c1

Browse files
committed
fix indentation and add curlies (closes #27093)
1 parent 05d3921 commit 5a093c1

1 file changed

Lines changed: 15 additions & 11 deletions

File tree

Modules/cjkcodecs/cjkcodecs.h

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -328,22 +328,26 @@ find_pairencmap(ucs2_t body, ucs2_t modifier,
328328
min = 0;
329329
max = haystacksize;
330330

331-
for (pos = haystacksize >> 1; min != max; pos = (min + max) >> 1)
331+
for (pos = haystacksize >> 1; min != max; pos = (min + max) >> 1) {
332332
if (value < haystack[pos].uniseq) {
333-
if (max == pos) break;
334-
else max = pos;
333+
if (max != pos) {
334+
max = pos;
335+
continue;
336+
}
335337
}
336338
else if (value > haystack[pos].uniseq) {
337-
if (min == pos) break;
338-
else min = pos;
339+
if (min != pos) {
340+
min = pos;
341+
continue;
342+
}
339343
}
340-
else
341-
break;
344+
break;
345+
}
342346

343-
if (value == haystack[pos].uniseq)
344-
return haystack[pos].code;
345-
else
346-
return DBCINV;
347+
if (value == haystack[pos].uniseq) {
348+
return haystack[pos].code;
349+
}
350+
return DBCINV;
347351
}
348352
#endif
349353

0 commit comments

Comments
 (0)