瀏覽代碼

llama : replacing auto &kv with const auto &kv (#2041)

* Replacing auto &kv with const auto &kv

* Create codacy.yml

* Delete codacy.yml
m3ndax 2 年之前
父節點
當前提交
d3494bb86b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      llama.cpp

+ 1 - 1
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);
     }