Use move semantics to support NonCopyable types

This commit is contained in:
Lauchmelder 2022-01-09 08:54:25 +01:00
parent b702bd00f4
commit 3592ba18a0

View file

@ -44,7 +44,7 @@ namespace lol
* @return A shared pointer to the newly constructed object
*/
template<typename T, typename... Args>
std::shared_ptr<T> Create(unsigned int id, Args... args)
std::shared_ptr<T> Create(unsigned int id, Args&&... args)
{
std::shared_ptr<T> object = std::make_shared<T>(args...);
objects.insert({id, object});