diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-04-25 17:00:07 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-04-25 17:00:07 -0400 |
commit | f782b81ba10c9b7a1e221b16de0aaa7b6c521729 (patch) | |
tree | f15e57d945b7b44b1af8c046b9a2003beaae97fd /src/entity_manager.cpp | |
parent | 0f70db34d9b47de55b00c558ac3c445f30b7b6a5 (diff) | |
download | therapy-f782b81ba10c9b7a1e221b16de0aaa7b6c521729.tar.gz therapy-f782b81ba10c9b7a1e221b16de0aaa7b6c521729.tar.bz2 therapy-f782b81ba10c9b7a1e221b16de0aaa7b6c521729.zip |
EntityManager const-correctness
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) |