]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
context : remove redundant explicit casting to the same type (#15948)
authorHaiyue Wang <redacted>
Fri, 12 Sep 2025 15:16:32 +0000 (23:16 +0800)
committerGitHub <redacted>
Fri, 12 Sep 2025 15:16:32 +0000 (18:16 +0300)
The function 'output_reserve' return type is 'uint32_t', so need to add
explicit casting.

src/llama-context.cpp

index 3e163001c180b3f40fec46903c5a9466a59f41ef..289a32b6d347319cf21e584945a18a0a5d15ddcb 100644 (file)
@@ -181,7 +181,7 @@ llama_context::llama_context(
         // graph outputs buffer
         {
             // resized during inference when a batch uses more outputs
-            if ((uint32_t) output_reserve(params.n_seq_max) < params.n_seq_max) {
+            if (output_reserve(params.n_seq_max) < params.n_seq_max) {
                 throw std::runtime_error("failed to reserve initial output buffer");
             }