summaryrefslogtreecommitdiff
path: root/common/grammar-parser.cpp
diff options
context:
space:
mode:
authorHerman Semenov <GermanAizek@yandex.ru>2023-10-20 10:02:12 +0000
committerGitHub <noreply@github.com>2023-10-20 13:02:12 +0300
commitf439e506e8ae8b01df2ae2156380f8156d7553e3 (patch)
tree59683267206e83bba460a13347caae31b7f0ea8e /common/grammar-parser.cpp
parente78f3ef24af4ca74e77e725644b41ae8ca3b10a5 (diff)
ggml : fix rope + llama minor optimizations (#3560)
* Minor fixes and fixed memleak * Using const auto references in range-based loop C++17
Diffstat (limited to 'common/grammar-parser.cpp')
-rw-r--r--common/grammar-parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/grammar-parser.cpp b/common/grammar-parser.cpp
index 5a545a80..ff51cc80 100644
--- a/common/grammar-parser.cpp
+++ b/common/grammar-parser.cpp
@@ -399,7 +399,7 @@ namespace grammar_parser {
void print_grammar(FILE * file, const parse_state & state) {
try {
std::map<uint32_t, std::string> symbol_id_names;
- for (auto kv : state.symbol_ids) {
+ for (const auto & kv : state.symbol_ids) {
symbol_id_names[kv.second] = kv.first;
}
for (size_t i = 0, end = state.rules.size(); i < end; i++) {