aboutsummaryrefslogtreecommitdiff
path: root/mwe/ecs-homemade/inc/ComponentManager.h
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-11-18 15:08:31 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-11-18 15:08:31 +0100
commitfee42c67918a9370f7f4e074dba9a677afccf90b (patch)
treec5ed200e3c584fafc4c6bd3df48adeed3cfbd31d /mwe/ecs-homemade/inc/ComponentManager.h
parented1403aea4412bd479244eae8e2940190e71cd28 (diff)
parent121b64b1cb6cfead5814070c8b0185d3d7308095 (diff)
Merge remote-tracking branch 'origin/master' into niels/RenderingParticle
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;
};