aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/ComponentManager.cpp
diff options
context:
space:
mode:
authormax-001 <maxsmits21@kpnmail.nl>2024-11-26 09:20:55 +0100
committermax-001 <maxsmits21@kpnmail.nl>2024-11-26 09:20:55 +0100
commitf52e7e1450d47604983dba5f3cbab364ffd77cdc (patch)
tree8c084f84605272e4092736152bb1f92bc781c68b /src/crepe/ComponentManager.cpp
parent41df3ad8836ce9c686a12fa7da5b4daebe94ba05 (diff)
Replaced vector by unordered_map
Diffstat (limited to 'src/crepe/ComponentManager.cpp')
-rw-r--r--src/crepe/ComponentManager.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/crepe/ComponentManager.cpp b/src/crepe/ComponentManager.cpp
index a90502d..e99419e 100644
--- a/src/crepe/ComponentManager.cpp
+++ b/src/crepe/ComponentManager.cpp
@@ -39,19 +39,11 @@ GameObject ComponentManager::new_object(const string & name, const string & tag,
// Find the first available id (taking persistent objects into account)
while (this->persistent[this->next_id]) {
this->next_id++;
- // Make sure that the persistent vector is large enough
- if (persistent.size() <= next_id) {
- this->persistent.resize(next_id + 1, false);
- }
}
GameObject object{*this, this->next_id, name, tag, position, rotation, scale};
this->next_id++;
- // Make sure that the persistent vector is large enough
- if (persistent.size() <= next_id) {
- this->persistent.resize(next_id + 1, false);
- }
return object;
}