]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
llama : replacing auto &kv with const auto &kv (#2041)
authorm3ndax <redacted>
Wed, 28 Jun 2023 18:39:08 +0000 (20:39 +0200)
committerGitHub <redacted>
Wed, 28 Jun 2023 18:39:08 +0000 (21:39 +0300)
* Replacing auto &kv with const auto &kv

* Create codacy.yml

* Delete codacy.yml

llama.cpp

index 47e11d03c2112b0e6f65f8bfe796842ff9e36a50..ef80b4e8bd3ead14703b770077e1cd4afdce23fa 100644 (file)
--- a/llama.cpp
+++ b/llama.cpp
@@ -2723,7 +2723,7 @@ int llama_apply_lora_from_file_internal(const struct llama_model & model, const
 
     // create a name -> tensor map of the model to accelerate lookups
     std::unordered_map<std::string, struct ggml_tensor*> model_tensors;
-    for (auto & kv: model.tensors_by_name) {
+    for (const auto & kv: model.tensors_by_name) {
         model_tensors.insert(kv);
     }