From 801abe52a3e52b2022506b2ef79f0c427614c53d Mon Sep 17 00:00:00 2001 From: Douglas Hanley Date: Tue, 27 Feb 2024 14:08:39 -0500 Subject: [PATCH] Simplify to_lower cases Co-authored-by: Jared Van Bortel --- llama.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/llama.cpp b/llama.cpp index 4c060134b..90e952038 100644 --- a/llama.cpp +++ b/llama.cpp @@ -8961,10 +8961,8 @@ struct llm_tokenizer_wpm { if (code > 0xFFFF) { return code; } - return std::tolower(static_cast(code), std::locale("en_US.UTF-8")); -#else - return std::tolower((wchar_t)code, std::locale("en_US.UTF-8")); #endif + return std::tolower(wchar_t(code), std::locale("en_US.UTF-8")); } bool is_ascii_punct(uint32_t code) {