diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-17 17:15:53 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-17 17:15:53 +0200 |
commit | a2c719948ff8af9abe267c4d1c9b16cd1e2fb317 (patch) | |
tree | b2509bc9d435e7efc0afdf99f82a8b483f65758f /src/crepe/ComponentManager.hpp | |
parent | 9fd3bdca9de2d37b63e1646b22d32b0b182f01ee (diff) |
`make format`
Diffstat (limited to 'src/crepe/ComponentManager.hpp')
-rw-r--r-- | src/crepe/ComponentManager.hpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/crepe/ComponentManager.hpp b/src/crepe/ComponentManager.hpp index e0242a2..2377a94 100644 --- a/src/crepe/ComponentManager.hpp +++ b/src/crepe/ComponentManager.hpp @@ -10,7 +10,8 @@ template <class T, typename... Args> T & ComponentManager::add_component(uint32_t id, Args &&... args) { using namespace std; - static_assert(is_base_of<Component, T>::value, "add_component must recieve a derivative class of Component"); + static_assert(is_base_of<Component, T>::value, + "add_component must recieve a derivative class of Component"); // Determine the type of T (this is used as the key of the unordered_map<>) type_index type = typeid(T); @@ -81,7 +82,8 @@ ComponentManager::get_components_by_id(uint32_t id) const { if (components.find(type) == components.end()) return component_vector; // Get the correct vector<> - const vector<vector<unique_ptr<Component>>> & component_array = components.at(type); + const vector<vector<unique_ptr<Component>>> & component_array + = components.at(type); // Make sure that the id (that we are looking for) is within the boundaries of the vector<> if (id >= component_array.size()) return component_vector; @@ -117,7 +119,8 @@ ComponentManager::get_components_by_type() const { if (components.find(type) == components.end()) return component_vector; // Get the correct vector<> - const vector<vector<unique_ptr<Component>>> & component_array = components.at(type); + const vector<vector<unique_ptr<Component>>> & component_array + = components.at(type); // Loop through the whole vector<> for (const vector<unique_ptr<Component>> & component : component_array) { |