diff options
Diffstat (limited to 'src/entity_manager.cpp')
-rw-r--r-- | src/entity_manager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/entity_manager.cpp b/src/entity_manager.cpp index f792e17..0aaaf8e 100644 --- a/src/entity_manager.cpp +++ b/src/entity_manager.cpp | |||
@@ -5,7 +5,7 @@ | |||
5 | 5 | ||
6 | template <> | 6 | template <> |
7 | std::set<EntityManager::id_type> EntityManager::getEntitiesWithComponents<>( | 7 | std::set<EntityManager::id_type> EntityManager::getEntitiesWithComponents<>( |
8 | std::set<std::type_index>& componentTypes) | 8 | std::set<std::type_index>& componentTypes) const |
9 | { | 9 | { |
10 | if (cachedComponents.count(componentTypes) == 1) | 10 | if (cachedComponents.count(componentTypes) == 1) |
11 | { | 11 | { |
@@ -15,7 +15,7 @@ std::set<EntityManager::id_type> EntityManager::getEntitiesWithComponents<>( | |||
15 | std::set<id_type>& cache = cachedComponents[componentTypes]; | 15 | std::set<id_type>& cache = cachedComponents[componentTypes]; |
16 | for (id_type entity = 0; entity < entities.size(); entity++) | 16 | for (id_type entity = 0; entity < entities.size(); entity++) |
17 | { | 17 | { |
18 | EntityData& data = entities[entity]; | 18 | const EntityData& data = entities[entity]; |
19 | bool cacheEntity = true; | 19 | bool cacheEntity = true; |
20 | 20 | ||
21 | for (auto& componentType : componentTypes) | 21 | for (auto& componentType : componentTypes) |