fix entity_duplicate prefix sum in release mode #184

This commit is contained in:
Turanszki Janos
2020-11-08 11:34:51 +01:00
parent 8d13f6cae1
commit 325bef4d96
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -1525,14 +1525,16 @@ namespace wiScene
// Gather all descendants in the hierarchy:
std::unordered_map<Entity, size_t> descendants;
descendants[entity] = descendants.size();
size_t prefix = descendants.size();
descendants[entity] = prefix;
for (size_t i = 0; i < hierarchy.GetCount(); ++i)
{
const HierarchyComponent& hier = hierarchy[i];
if (descendants.count(hier.parentID) != 0)
{
Entity child = hierarchy.GetEntity(i);
descendants[child] = descendants.size();
prefix = descendants.size();
descendants[child] = prefix;
Entity_Serialize(archive, child);
}
}
+1 -1
View File
@@ -9,7 +9,7 @@ namespace wiVersion
// minor features, major updates, breaking API changes
const int minor = 49;
// minor bug fixes, alterations, refactors, updates
const int revision = 15;
const int revision = 16;
const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);