fix some warnings from gcc and clang-tidy (#3038)

Co-authored-by: xaedes <xaedes@gmail.com>
This commit is contained in:
Cebtenzzre
2023-09-07 13:22:29 -04:00
committed by GitHub
parent 4fa2cc1750
commit 00d62adb79
22 changed files with 63 additions and 101 deletions

View File

@ -415,6 +415,7 @@ namespace grammar_parser {
std::vector<const llama_grammar_element *> parse_state::c_rules() {
std::vector<const llama_grammar_element *> ret;
ret.reserve(rules.size());
for (const auto & rule : rules) {
ret.push_back(rule.data());
}