From 89e74c67e20bd2b89722fd892bdd5f22e5f4bdaf Mon Sep 17 00:00:00 2001 From: goerch Date: Mon, 18 Sep 2023 20:15:43 +0200 Subject: [PATCH] Try to fix build problem --- unicode.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/unicode.h b/unicode.h index 84b9a35ee..23d1cb869 100644 --- a/unicode.h +++ b/unicode.h @@ -399,13 +399,13 @@ static int codepoint_type(std::string utf8) { static std::string bytes_to_unicode_bpe(uint8_t byte) { static std::unordered_map map; - for (int ch = u'!'; ch <= u'~'; ++ch) { + for (int ch = U'!'; ch <= U'~'; ++ch) { map[ch] = codepoint_to_utf8(ch); } - for (int ch = u'¡'; ch <= u'¬'; ++ch) { + for (int ch = U'¡'; ch <= U'¬'; ++ch) { map[ch] = codepoint_to_utf8(ch); } - for (int ch = u'®'; ch <= u'ÿ'; ++ch) { + for (int ch = U'®'; ch <= U'ÿ'; ++ch) { map[ch] = codepoint_to_utf8(ch); } auto n = 0; @@ -421,13 +421,13 @@ static std::string bytes_to_unicode_bpe(uint8_t byte) { static uint8_t unicode_to_bytes_bpe(const std::string& utf8) { static std::unordered_map map; if (map.size() == 0) { - for (int ch = u'!'; ch <= u'~'; ++ch) { + for (int ch = U'!'; ch <= U'~'; ++ch) { map[codepoint_to_utf8(ch)] = ch; } - for (int ch = u'¡'; ch <= u'¬'; ++ch) { + for (int ch = U'¡'; ch <= U'¬'; ++ch) { map[codepoint_to_utf8(ch)] = ch; } - for (int ch = u'®'; ch <= u'ÿ'; ++ch) { + for (int ch = U'®'; ch <= U'ÿ'; ++ch) { map[codepoint_to_utf8(ch)] = ch; } auto n = 0;