Skip to content

Commit

Permalink
Clean up: Fix lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleTanPY committed Dec 14, 2024
1 parent 0579e3b commit 558e690
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/unicode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -676,10 +676,9 @@ std::vector<std::string> unicode_regex_split(const std::string & text, const std
};

static const std::map<int, std::string> 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
Expand Down
2 changes: 1 addition & 1 deletion src/unicode.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint16_t*>(this) = flags;
}

Expand Down

0 comments on commit 558e690

Please sign in to comment.