aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/ComponentManager.hpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-05 18:48:46 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-05 18:48:46 +0100
commit3fe7400de095756362b999908fd2a2ba3b71a848 (patch)
tree8a6c6d4213fdab076a451f37e6471ca5965b2c8f /src/crepe/ComponentManager.hpp
parentae6a103946e437ca85cc69c5fc2cbf68d35ffeae (diff)
merge #18
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;
}