Sdk/World: Use a Bitset to store free entity id

This commit is contained in:
Jérôme Leclercq
2018-02-08 15:15:56 +01:00
parent 555817e3ee
commit 6161b1a751
4 changed files with 12 additions and 8 deletions

View File

@@ -96,9 +96,9 @@ namespace Ndk
std::vector<EntityBlock> m_entities;
std::vector<EntityBlock*> m_entityBlocks;
std::vector<std::unique_ptr<EntityBlock>> m_waitingEntities;
std::vector<EntityId> m_freeIdList;
EntityList m_aliveEntities;
Nz::Bitset<Nz::UInt64> m_dirtyEntities;
Nz::Bitset<Nz::UInt64> m_freeEntityIds;
Nz::Bitset<Nz::UInt64> m_killedEntities;
bool m_orderedSystemsUpdated;
};

View File

@@ -288,7 +288,7 @@ namespace Ndk
m_aliveEntities = std::move(world.m_aliveEntities);
m_dirtyEntities = std::move(world.m_dirtyEntities);
m_entityBlocks = std::move(world.m_entityBlocks);
m_freeIdList = std::move(world.m_freeIdList);
m_freeEntityIds = std::move(world.m_freeEntityIds);
m_killedEntities = std::move(world.m_killedEntities);
m_orderedSystems = std::move(world.m_orderedSystems);
m_orderedSystemsUpdated = world.m_orderedSystemsUpdated;