diff options
author | Fawrsk <45524015+Fawrsk@users.noreply.github.com> | 2023-01-03 17:08:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-03 23:08:15 +0200 |
commit | 74a9280c698b4f88a46549923a2d717b82dd7ee2 (patch) | |
tree | 029f57168a5f69cb7eb60b21faddecdeadec0f26 /indra/llappearance/llpolymesh.cpp | |
parent | 43496fe04e7dadae230da5b633a389ba0b7c0b0b (diff) |
SL-18893 Clean up for loops in llappearance to use C++11 range based for loops (#38)
Diffstat (limited to 'indra/llappearance/llpolymesh.cpp')
-rw-r--r-- | indra/llappearance/llpolymesh.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/indra/llappearance/llpolymesh.cpp b/indra/llappearance/llpolymesh.cpp index 3892e4ce43..d0f0199d61 100644 --- a/indra/llappearance/llpolymesh.cpp +++ b/indra/llappearance/llpolymesh.cpp @@ -890,11 +890,10 @@ void LLPolyMesh::dumpDiagInfo() LL_INFOS() << "-----------------------------------------------------" << LL_ENDL; // print each loaded mesh, and it's memory usage - for(LLPolyMeshSharedDataTable::iterator iter = sGlobalSharedMeshList.begin(); - iter != sGlobalSharedMeshList.end(); ++iter) + for(const auto& mesh_pair : sGlobalSharedMeshList) { - const std::string& mesh_name = iter->first; - LLPolyMeshSharedData* mesh = iter->second; + const std::string& mesh_name = mesh_pair.first; + LLPolyMeshSharedData* mesh = mesh_pair.second; S32 num_verts = mesh->mNumVertices; S32 num_faces = mesh->mNumFaces; @@ -997,14 +996,12 @@ LLPolyMorphData* LLPolyMesh::getMorphData(const std::string& morph_name) { if (!mSharedData) return NULL; - for (LLPolyMeshSharedData::morphdata_list_t::iterator iter = mSharedData->mMorphData.begin(); - iter != mSharedData->mMorphData.end(); ++iter) + for (auto morph_data : mSharedData->mMorphData) { - LLPolyMorphData *morph_data = *iter; - if (morph_data->getName() == morph_name) - { - return morph_data; - } + if (morph_data->getName() == morph_name) + { + return morph_data; + } } return NULL; } |