Fixed a bunch of clang warnings

1. Fix misleading indentation warnings.
2. Fix creating a temporary const copy when iterating over a map (thanks to range analysis warnings)
3. Fix creating a copy when iterating over a range without reference qualifier (also thanks to range analysis warnings)
This commit is contained in:
Hanif Bin Ariffin
2020-01-30 18:42:30 -05:00
parent 78b074ac5a
commit bbe6f7f213
4 changed files with 5 additions and 5 deletions

View File

@@ -685,7 +685,7 @@ bool XGLImporter::ReadMesh(TempScope& 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) {
aiMesh* const m = ToOutputMesh(p.second);
scope.meshes_linear.push_back(m);