]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
CANN: Make `valid_values` variable `static const` (llama/18627)
authorRaul Torres <redacted>
Tue, 6 Jan 2026 03:53:28 +0000 (03:53 +0000)
committerGeorgi Gerganov <redacted>
Wed, 14 Jan 2026 07:11:59 +0000 (09:11 +0200)
ggml/src/ggml-cann/ggml-cann.cpp

index 7f6214e4fb40a23f745830f3a96db4ab46423bb5..acf88db9b77cbbced20f1c369e96de4573ddf87b 100644 (file)
@@ -122,7 +122,7 @@ std::optional<std::string> 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<std::string> valid_values = { "on", "1", "yes", "y", "enable", "true" };
+    static const std::unordered_set<std::string> valid_values = { "on", "1", "yes", "y", "enable", "true" };
     return valid_values.find(value) != valid_values.end();
 }