Add a scope so mapPivot is destroyed when no longer used
parent
92f7c50c91
commit
53c6cc0966
|
@ -565,6 +565,7 @@ void LWOImporter::GenerateNodeGraph(std::map<uint16_t, aiNode *> &apcNodes) {
|
||||||
root->mName.Set("<LWORoot>");
|
root->mName.Set("<LWORoot>");
|
||||||
|
|
||||||
//Set parent of all children, inserting pivots
|
//Set parent of all children, inserting pivots
|
||||||
|
{
|
||||||
std::map<uint16_t, aiNode *> mapPivot;
|
std::map<uint16_t, aiNode *> mapPivot;
|
||||||
for (auto itapcNodes = apcNodes.begin(); itapcNodes != apcNodes.end(); ++itapcNodes) {
|
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) {
|
for (auto itMapPivot = mapPivot.begin(); itMapPivot != mapPivot.end(); ++itMapPivot) {
|
||||||
apcNodes[itMapPivot->first] = itMapPivot->second;
|
apcNodes[itMapPivot->first] = itMapPivot->second;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Set children of all parents
|
//Set children of all parents
|
||||||
apcNodes[(uint16_t)-1] = root;
|
apcNodes[(uint16_t)-1] = root;
|
||||||
|
|
Loading…
Reference in New Issue