aboutsummaryrefslogtreecommitdiff
path: root/mwe/ecs-homemade/inc/ComponentManager.h
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-11-16 15:26:54 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-11-16 15:26:54 +0100
commit6b3feac981ce78144fb69e490640a4b07dd29f1d (patch)
tree88c9a7b1b03ada97a8152591deb035681f99b7c8 /mwe/ecs-homemade/inc/ComponentManager.h
parent8209678e20605936b2ce58331c1a65d8f23fee91 (diff)
parent9f6475e7b0698c414138e2a8140b47f01ce9c5d1 (diff)
Merge branch 'master' of https://github.com/lonkaars/crepe into wouter/events
Diffstat (limited to 'mwe/ecs-homemade/inc/ComponentManager.h')
-rw-r--r--mwe/ecs-homemade/inc/ComponentManager.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/mwe/ecs-homemade/inc/ComponentManager.h b/mwe/ecs-homemade/inc/ComponentManager.h
index 0ba358e..99c108f 100644
--- a/mwe/ecs-homemade/inc/ComponentManager.h
+++ b/mwe/ecs-homemade/inc/ComponentManager.h
@@ -33,8 +33,7 @@ public:
//Get a vector<> of all components at specific type and id
template <typename T>
- std::vector<std::reference_wrapper<T>>
- GetComponentsByID(std::uint32_t id) const;
+ std::vector<std::reference_wrapper<T>> GetComponentsByID(std::uint32_t id) const;
//Get a vector<> of all components of a specific type
template <typename T>
std::vector<std::reference_wrapper<T>> GetComponentsByType() const;
@@ -50,8 +49,7 @@ private:
* The first std::vector<> stores another vector<>. This first vector<> is to bind the entity's id to a component.
* The second std::vector<> stores unique_ptrs. Each component can be gathered via an unique_ptr. This second vector<> allows multiple components of the same std::type_index for one entity (id).
*/
- std::unordered_map<std::type_index,
- std::vector<std::vector<std::unique_ptr<Component>>>>
+ std::unordered_map<std::type_index, std::vector<std::vector<std::unique_ptr<Component>>>>
mComponents;
};