summary refs log tree commit diff stats
path: root/src/entity_manager.cpp
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2018-04-25 17:00:07 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2018-04-25 17:00:07 -0400
commitf782b81ba10c9b7a1e221b16de0aaa7b6c521729 (patch)
treef15e57d945b7b44b1af8c046b9a2003beaae97fd /src/entity_manager.cpp
parent0f70db34d9b47de55b00c558ac3c445f30b7b6a5 (diff)
downloadtherapy-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.cpp4
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
6template <> 6template <>
7std::set<EntityManager::id_type> EntityManager::getEntitiesWithComponents<>( 7std::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)