aboutsummaryrefslogtreecommitdiff
path: root/mwe/ecs-homemade/src/ComponentManager.cpp
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2025-01-03 19:39:23 +0100
committerJAROWMR <jarorutjes07@gmail.com>2025-01-03 19:39:23 +0100
commit4f687de3530fac052f30dac7b8c59dae103bcf81 (patch)
treeaf02b332b6a6efced3357834cc2f30fbfe7b223b /mwe/ecs-homemade/src/ComponentManager.cpp
parentd65e0ff31a75230fd1c18eaeab9cb25ab2b9c82a (diff)
parent61148c757a1f742ff09e40e5347e74e638c7371c (diff)
merge
Diffstat (limited to 'mwe/ecs-homemade/src/ComponentManager.cpp')
-rw-r--r--mwe/ecs-homemade/src/ComponentManager.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/mwe/ecs-homemade/src/ComponentManager.cpp b/mwe/ecs-homemade/src/ComponentManager.cpp
index 33ba12e..835bdda 100644
--- a/mwe/ecs-homemade/src/ComponentManager.cpp
+++ b/mwe/ecs-homemade/src/ComponentManager.cpp
@@ -9,9 +9,8 @@ ComponentManager::ComponentManager() {}
void ComponentManager::DeleteAllComponentsOfId(std::uint32_t id) {
for (auto & [type, componentArray] :
mComponents) { //Loop through all the types (in the unordered_map<>)
- if (id
- < componentArray
- .size()) { //Make sure that the id (that we are looking for) is within the boundaries of the vector<>
+ if (id < componentArray.size(
+ )) { //Make sure that the id (that we are looking for) is within the boundaries of the vector<>
componentArray[id].clear(); //Clear the components at this specific id
}
}