Add a scope so mapPivot is destroyed when no longer used

This commit is contained in:
Turo Lamminen
2023-02-24 13:19:38 +02:00
parent 92f7c50c91
commit 53c6cc0966
+2
View File
@@ -565,6 +565,7 @@ void LWOImporter::GenerateNodeGraph(std::map<uint16_t, aiNode *> &apcNodes) {
root->mName.Set("<LWORoot>");
//Set parent of all children, inserting pivots
{
std::map<uint16_t, aiNode *> mapPivot;
for (auto itapcNodes = apcNodes.begin(); itapcNodes != apcNodes.end(); ++itapcNodes) {
@@ -599,6 +600,7 @@ void LWOImporter::GenerateNodeGraph(std::map<uint16_t, aiNode *> &apcNodes) {
for (auto itMapPivot = mapPivot.begin(); itMapPivot != mapPivot.end(); ++itMapPivot) {
apcNodes[itMapPivot->first] = itMapPivot->second;
}
}
//Set children of all parents
apcNodes[(uint16_t)-1] = root;