From d7bf5132500d7f568bb9c0ce31f83e86548cd230 Mon Sep 17 00:00:00 2001 From: contriteobserver Date: Tue, 26 Jan 2021 01:36:12 -0800 Subject: [PATCH] renaming iterator to avoid any possibility of scop collisions --- code/AssetLib/Collada/ColladaLoader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/AssetLib/Collada/ColladaLoader.cpp b/code/AssetLib/Collada/ColladaLoader.cpp index 297616b4e..96599f22f 100644 --- a/code/AssetLib/Collada/ColladaLoader.cpp +++ b/code/AssetLib/Collada/ColladaLoader.cpp @@ -557,9 +557,9 @@ void ColladaLoader::BuildMeshesForNode(const ColladaParser &pParser, const Colla faceStart += submesh.mNumFaces; // assign the material index - std::map::const_iterator matIt = mMaterialIndexByName.find(submesh.mMaterial); - if (matIt != mMaterialIndexByName.end()) { - dstMesh->mMaterialIndex = static_cast(matIt->second); + std::map::const_iterator subMatIt = mMaterialIndexByName.find(submesh.mMaterial); + if (subMatIt != mMaterialIndexByName.end()) { + dstMesh->mMaterialIndex = static_cast(subMatIt->second); } else { dstMesh->mMaterialIndex = matIdx; }