From 2cbf35489fe83fc1f398fce9d64df34f2345d885 Mon Sep 17 00:00:00 2001 From: arvidn Date: Sun, 24 Sep 2017 16:36:01 -0700 Subject: [PATCH] fiw warning in ConvertUTF.cpp --- src/ConvertUTF.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ConvertUTF.cpp b/src/ConvertUTF.cpp index e5789a1f0..9137048a4 100644 --- a/src/ConvertUTF.cpp +++ b/src/ConvertUTF.cpp @@ -58,6 +58,9 @@ static const UTF32 halfMask = 0x3FFUL; /* --------------------------------------------------------------------- */ +// TODO: 3 replace this implementation with something maintained and/or robust. +// Perhaps std::codecvt<> + ConversionResult ConvertUTF32toUTF16 ( const UTF32** sourceStart, const UTF32* sourceEnd, UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags) { @@ -308,7 +311,7 @@ Boolean isLegalUTF8(const UTF8 *source, int length) { case 0xED: if (a > 0x9F) return false; break; case 0xF0: if (a < 0x90) return false; break; case 0xF4: if (a > 0x8F) return false; break; - default: if (a < 0x80) return false; + default: break; } case 1: if (*source >= 0x80 && *source < 0xC2) return false;