From a0ba913613235c1639f92877f09e82c3db6fef47 Mon Sep 17 00:00:00 2001 From: Ed Addario Date: Wed, 19 Nov 2025 11:19:44 +0000 Subject: [PATCH] Fix lambda capture bug in Windows and initialise candidate_types struct --- src/llama-quant.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/llama-quant.cpp b/src/llama-quant.cpp index 1e8a2cda9c..86ca165b6c 100644 --- a/src/llama-quant.cpp +++ b/src/llama-quant.cpp @@ -652,10 +652,10 @@ static std::unordered_map target_bpw_type( } signal_guard; struct candidate_types { - ggml_type type; - float bpw; - size_t bytes; - double error; + ggml_type type = GGML_TYPE_COUNT; + float bpw = 0.0f; + size_t bytes = 0; + double error = 0.0; double mse = 0.0; double proj = 0.0; }; @@ -751,7 +751,7 @@ static std::unordered_map target_bpw_type( size_t n_elements = 0; }; - auto djb2_hash = [](const uint8_t * data, size_t n) -> uint64_t { + auto djb2_hash = [&](const uint8_t * data, const size_t n) -> uint64_t { uint64_t h = 5381; for (size_t i = 0; i < n; ++i) { h = (h << 5) + h + data[i];