From: Raul Torres Date: Tue, 6 Jan 2026 03:53:28 +0000 (+0000) Subject: CANN: Make `valid_values` variable `static const` (llama/18627) X-Git-Tag: upstream/1.8.3~36 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=9a1a6685baa41b8cd63c84a59ba207ae4695e92c;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp CANN: Make `valid_values` variable `static const` (llama/18627) --- diff --git a/ggml/src/ggml-cann/ggml-cann.cpp b/ggml/src/ggml-cann/ggml-cann.cpp index 7f6214e4..acf88db9 100644 --- a/ggml/src/ggml-cann/ggml-cann.cpp +++ b/ggml/src/ggml-cann/ggml-cann.cpp @@ -122,7 +122,7 @@ std::optional get_env(const std::string & name) { * @brief Verify whether the environment variable is a valid value. */ bool parse_bool(const std::string & value) { - std::unordered_set valid_values = { "on", "1", "yes", "y", "enable", "true" }; + static const std::unordered_set valid_values = { "on", "1", "yes", "y", "enable", "true" }; return valid_values.find(value) != valid_values.end(); }