aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/ComponentManager.hpp
diff options
context:
space:
mode:
authormax-001 <maxsmits21@kpnmail.nl>2024-11-06 09:52:05 +0100
committermax-001 <maxsmits21@kpnmail.nl>2024-11-06 09:52:05 +0100
commitf4083c161a1176c900629ba61d96843645fc7be5 (patch)
tree0c136c9af142a4f7018a7441ec879b3b41da02c0 /src/crepe/ComponentManager.hpp
parentbf4c172f2709adf5a6f210bae60e16972e8decad (diff)
parent6ce2c14077e3e6dd01398d582b42dc50e9141f54 (diff)
Merge remote-tracking branch 'origin/master' into max/scenes
Diffstat (limited to 'src/crepe/ComponentManager.hpp')
-rw-r--r--src/crepe/ComponentManager.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/crepe/ComponentManager.hpp b/src/crepe/ComponentManager.hpp
index f469d12..e74f2e9 100644
--- a/src/crepe/ComponentManager.hpp
+++ b/src/crepe/ComponentManager.hpp
@@ -36,12 +36,13 @@ T & ComponentManager::add_component(uint32_t id, Args &&... args) {
// Check if the vector size is not greater than get_instances_max
if (instance->get_instances_max() != -1
&& components[type][id].size() >= instance->get_instances_max()) {
+ // TODO: Exception
throw std::runtime_error(
"Exceeded maximum number of instances for this component type");
}
// store its unique_ptr in the vector<>
- components[type][id].push_back(move(instance));
+ components[type][id].push_back(std::move(instance));
return *instance;
}