Changed type of components container to make deleting more efficient

This commit is contained in:
2014-03-13 02:39:08 +01:00
parent e20516f993
commit ded88eaadd
3 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ void World::RemoveEntity(EntityID entity)
for (auto pair : m_EntityComponents[entity]) {
auto type = pair.first;
auto component = pair.second;
m_ComponentsOfType[type].erase(std::remove(m_ComponentsOfType[type].begin(), m_ComponentsOfType[type].end(), component));
m_ComponentsOfType[type].remove(component);
}
RecycleEntityID(entity);
}