Skip to content

Commit 07f1400

Browse files
committed
Revert "change type to UChar32 to fix IsValidCodepoint"
This reverts commit a404c9c. That code no longer matched the specification (see code comment). Signed-off-by: Stefan Weil <[email protected]>
1 parent 3b62bad commit 07f1400

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

training/normstrngs.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ bool IsOCREquivalent(char32 ch1, char32 ch2) {
217217

218218
bool IsValidCodepoint(const char32 ch) {
219219
// In the range [0, 0xD800) or [0xE000, 0x10FFFF]
220-
return (static_cast<UChar32>(ch) < 0xD800) || (ch >= 0xE000 && ch <= 0x10FFFF);
220+
return (static_cast<uint32_t>(ch) < 0xD800) || (ch >= 0xE000 && ch <= 0x10FFFF);
221221
}
222222

223223
bool IsWhitespace(const char32 ch) {

0 commit comments

Comments
 (0)