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

* Replacing auto &kv with const auto &kv

* Create codacy.yml

* Delete codacy.yml
This commit is contained in:
m3ndax 2023-06-28 20:39:08 +02:00 committed by GitHub
parent 5b351e94d0
commit d3494bb86b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 // create a name -> tensor map of the model to accelerate lookups
std::unordered_map<std::string, struct ggml_tensor*> model_tensors; 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); model_tensors.insert(kv);
} }