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: v0.9.6~112 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=16f62c515434e805eb14cb25acb5f798f21d4752;p=pkg%2Fggml%2Fsources%2Fggml CANN: Make `valid_values` variable `static const` (llama/18627) --- diff --git a/src/ggml-cann/ggml-cann.cpp b/src/ggml-cann/ggml-cann.cpp index 7f6214e4..acf88db9 100644 --- a/src/ggml-cann/ggml-cann.cpp +++ b/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(); }