]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
Fix compile bug (#20203)
authorPiotr Wilkin (ilintar) <redacted>
Sun, 8 Mar 2026 16:15:49 +0000 (17:15 +0100)
committerGitHub <redacted>
Sun, 8 Mar 2026 16:15:49 +0000 (17:15 +0100)
* Fix compile bug

* Update common/chat-auto-parser-helpers.cpp

Co-authored-by: Sigbjørn Skjæret <redacted>
---------

Co-authored-by: Sigbjørn Skjæret <redacted>
common/chat-auto-parser-helpers.cpp

index 1519d8bc6cff3c7dd68e2040b4e839a6daf324e8..787d7bab9868ff6da2c1480105a9f640b74bf96a 100644 (file)
@@ -162,7 +162,7 @@ diff_split calculate_diff_split(const std::string & left, const std::string & ri
         right_fully_consumed = true;
     }
 
-    auto eat_segment = [](std::string & str, segment & seg) -> std::string { return str.append(seg.value); };
+    auto eat_segment = [](std::string str, const segment & seg) -> std::string { return std::move(str) + seg.value; };
 
     bool can_have_text_suffix = left_end->type == segment_type::TEXT && right_end->type == segment_type::TEXT;
     bool can_have_text_prefix = right_start->type == segment_type::TEXT && left_start->type == segment_type::TEXT;