Clean up: Fix lint.
This commit is contained in:
parent
0579e3bf65
commit
558e690614
2 changed files with 4 additions and 5 deletions
|
@ -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 = {
|
static const std::map<int, std::string> k_ucat_map = {
|
||||||
{ llama_codepoint_flags::LLAMA_NUMBER, "\x30-\x39" }, // 0-9
|
{ 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_LETTER, "\x41-\x5A\x61-\x7A"}, // A-Za-z
|
||||||
{ llama_codepoint_flags::LLAMA_PUNCTUATION,
|
{ llama_codepoint_flags::LLAMA_PUNCTUATION, "\x21-\x23\x25-\x2A\x2C-\x2F\x3A-\x3B\x3F-\x40\\\x5B-\\\x5D\x5F\\\x7B\\\x7D"}, // !-#%-*,-/:-;?-@\[-\]_\{\}
|
||||||
"\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
|
// compute collapsed codepoints only if needed by at least one regex
|
||||||
|
|
|
@ -33,7 +33,7 @@ struct llama_codepoint_flags {
|
||||||
uint16_t is_nfd : 1;
|
uint16_t is_nfd : 1;
|
||||||
|
|
||||||
// decode from uint16
|
// 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;
|
*reinterpret_cast<uint16_t*>(this) = flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue