diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2025-04-01 15:02:24 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2025-04-01 15:24:15 +0300 |
commit | 497c309a5b148fd86a0e1429343092f0a6ca2e0d (patch) | |
tree | 6933bc3791e94dedb1686ce7cd313375eb31c9b1 | |
parent | c609a45c26dae083cedc8d06566564cb55d2e72e (diff) |
#912 Refactor FindModel()
-rw-r--r-- | indra/newview/llmodelpreview.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index 4ac3abd747..5a8fd299bf 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -132,16 +132,16 @@ std::string getLodSuffix(S32 lod) return suffix; } -static bool FindModel(LLModelLoader::scene& scene, const std::string& name_to_match, LLModel*& baseModelOut, LLMatrix4& matOut) +static bool FindModel(const LLModelLoader::scene& scene, const std::string& name_to_match, LLModel*& baseModelOut, LLMatrix4& matOut) { - for (auto scene_iter = scene.begin(); scene_iter != scene.end(); scene_iter++) + for (const auto& scene_pair : scene) { - for (auto model_iter = scene_iter->second.begin(); model_iter != scene_iter->second.end(); model_iter++) + for (const auto& model_iter : scene_pair.second) { - if (model_iter->mModel && (model_iter->mModel->mLabel == name_to_match)) + if (model_iter.mModel && (model_iter.mModel->mLabel == name_to_match)) { - baseModelOut = model_iter->mModel; - matOut = scene_iter->first; + baseModelOut = model_iter.mModel; + matOut = scene_pair.first; return true; } } |