Browse Source

renaming iterator to avoid any possibility of scop collisions

contriteobserver 4 years ago
parent
commit
d7bf513250
1 changed files with 3 additions and 3 deletions
  1. 3 3
      code/AssetLib/Collada/ColladaLoader.cpp

+ 3 - 3
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<std::string, size_t>::const_iterator matIt = mMaterialIndexByName.find(submesh.mMaterial);
-                if (matIt != mMaterialIndexByName.end()) {
-                    dstMesh->mMaterialIndex = static_cast<unsigned int>(matIt->second);
+                std::map<std::string, size_t>::const_iterator subMatIt = mMaterialIndexByName.find(submesh.mMaterial);
+                if (subMatIt != mMaterialIndexByName.end()) {
+                    dstMesh->mMaterialIndex = static_cast<unsigned int>(subMatIt->second);
                 } else {
                     dstMesh->mMaterialIndex = matIdx;
                 }