aboutsummaryrefslogtreecommitdiff
path: root/mwe/ecs-homemade
diff options
context:
space:
mode:
Diffstat (limited to 'mwe/ecs-homemade')
-rw-r--r--mwe/ecs-homemade/inc/ComponentManager.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/mwe/ecs-homemade/inc/ComponentManager.hpp b/mwe/ecs-homemade/inc/ComponentManager.hpp
index 75b2ab1..53dfddd 100644
--- a/mwe/ecs-homemade/inc/ComponentManager.hpp
+++ b/mwe/ecs-homemade/inc/ComponentManager.hpp
@@ -76,7 +76,7 @@ std::vector<std::pair<std::reference_wrapper<T>, std::uint32_t>> ComponentManage
T* castedComponent = static_cast<T*>(componentPtr.get()); //Cast the unique_ptr to a raw pointer
if (castedComponent) { //Ensure that the cast was successful
- componentVector.push_back(std::make_pair(std::ref(*castedComponent), id)); //Pair the dereferenced raw pointer and the id and add it to the vector<>
+ componentVector.emplace_back(std::ref(*castedComponent), id); //Pair the dereferenced raw pointer and the id and add it to the vector<>
}
}