Add a scope so mapPivot is destroyed when no longer used
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user