Fix for issue #3445

Add const to avoid creating a temporary copy.

This should fix the cmake compilation error on XGLLoader.cpp shown in bug #3445

The fix is similar to commit bbe6f7f213
pull/3453/head
Jukka Maatta 2020-10-13 21:56:43 +03:00
parent ba1145885d
commit 6848a18999
1 changed files with 1 additions and 1 deletions

View File

@ -598,7 +598,7 @@ bool XGLImporter::ReadMesh(XmlNode &node, TempScope &scope) {
} }
// finally extract output meshes and add them to the scope // finally extract output meshes and add them to the scope
typedef std::pair<unsigned int, TempMaterialMesh> pairt; typedef std::pair<const unsigned int, TempMaterialMesh> pairt;
for (const pairt &p : bymat) { for (const pairt &p : bymat) {
aiMesh *const m = ToOutputMesh(p.second); aiMesh *const m = ToOutputMesh(p.second);
scope.meshes_linear.push_back(m); scope.meshes_linear.push_back(m);