diff options
author | max-001 <maxsmits21@kpnmail.nl> | 2024-11-06 14:16:55 +0100 |
---|---|---|
committer | max-001 <maxsmits21@kpnmail.nl> | 2024-11-06 14:16:55 +0100 |
commit | c6ce7e13c5fe802a7eba35189916023925dbfdc1 (patch) | |
tree | 98a5d61b4f5484c269acfbf82e1007763270c998 /src/crepe/ComponentManager.hpp | |
parent | db5a3668aa4b3919ee8dce7ed0872aa5707f80ff (diff) |
Added comments and replaced some auto with concrete types
Diffstat (limited to 'src/crepe/ComponentManager.hpp')
-rw-r--r-- | src/crepe/ComponentManager.hpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/crepe/ComponentManager.hpp b/src/crepe/ComponentManager.hpp index e74f2e9..11c4d15 100644 --- a/src/crepe/ComponentManager.hpp +++ b/src/crepe/ComponentManager.hpp @@ -122,8 +122,6 @@ ComponentManager::get_components_by_type() const { // Create an empty vector<> vector<reference_wrapper<T>> component_vector; - // Set the id to 0 (the id will also be stored in the returned vector<>) - // uint32_t id = 0; // Find the type (in the unordered_map<>) if (components.find(type) == components.end()) return component_vector; @@ -142,12 +140,9 @@ ComponentManager::get_components_by_type() const { // Ensure that the cast was successful if (casted_component == nullptr) continue; - // Pair the dereferenced raw pointer and the id and add it to the vector<> + // Add the dereferenced raw pointer to the vector<> component_vector.emplace_back(ref(*casted_component)); } - - // Increase the id (the id will also be stored in the returned vector<>) - //++id; } // Return the vector<> |