From 49a700ccff5e62eb4d825e8c75b91200fe069684 Mon Sep 17 00:00:00 2001 From: Cebtenzzre Date: Tue, 5 Sep 2023 18:46:19 -0400 Subject: [PATCH] server : make token_with_probs non-const (clang-tidy) According to the 'performance-no-automatic-move' check, this allows an automatic move of the return value (std::move) instead of a copy. --- examples/server/server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/server/server.cpp b/examples/server/server.cpp index 810000861..3f3c64650 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -611,7 +611,7 @@ struct llama_server_context completion_token_output doCompletion() { - const completion_token_output token_with_probs = nextToken(); + auto token_with_probs = nextToken(); const std::string token_text = token_with_probs.tok == -1 ? "" : llama_token_to_piece(ctx, token_with_probs.tok); generated_text += token_text;