aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/ComponentManager.cpp
diff options
context:
space:
mode:
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;
}