From 558e690614801678df162fd5c193e28769e36778 Mon Sep 17 00:00:00 2001 From: MichelleTPY Date: Sat, 14 Dec 2024 15:41:15 +0000 Subject: [PATCH] Clean up: Fix lint. --- src/unicode.cpp | 7 +++---- src/unicode.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/unicode.cpp b/src/unicode.cpp index f7ef7b8de1091..f379c1b743d03 100644 --- a/src/unicode.cpp +++ b/src/unicode.cpp @@ -676,10 +676,9 @@ std::vector unicode_regex_split(const std::string & text, const std }; static const std::map k_ucat_map = { - { llama_codepoint_flags::LLAMA_NUMBER, "\x30-\x39" }, // 0-9 - { llama_codepoint_flags::LLAMA_LETTER, "\x41-\x5A\x61-\x7A" }, // A-Za-z - { llama_codepoint_flags::LLAMA_PUNCTUATION, - "\x21-\x23\x25-\x2A\x2C-\x2F\x3A-\x3B\x3F-\x40\\\x5B-\\\x5D\x5F\\\x7B\\\x7D" }, // !-#%-*,-/:-;?-@\[-\]_\{\} + { llama_codepoint_flags::LLAMA_NUMBER, "\x30-\x39"}, // 0-9 + { llama_codepoint_flags::LLAMA_LETTER, "\x41-\x5A\x61-\x7A"}, // A-Za-z + { llama_codepoint_flags::LLAMA_PUNCTUATION, "\x21-\x23\x25-\x2A\x2C-\x2F\x3A-\x3B\x3F-\x40\\\x5B-\\\x5D\x5F\\\x7B\\\x7D"}, // !-#%-*,-/:-;?-@\[-\]_\{\} }; // compute collapsed codepoints only if needed by at least one regex diff --git a/src/unicode.h b/src/unicode.h index af7c2128d6aa4..578974488874d 100644 --- a/src/unicode.h +++ b/src/unicode.h @@ -33,7 +33,7 @@ struct llama_codepoint_flags { uint16_t is_nfd : 1; // decode from uint16 - inline llama_codepoint_flags(const uint16_t flags = 0) { + inline llama_codepoint_flags(const uint16_t flags=0) { *reinterpret_cast(this) = flags; }