Use move semantics to support NonCopyable types
This commit is contained in:
parent
b702bd00f4
commit
3592ba18a0
1 changed files with 1 additions and 1 deletions
|
@ -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});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue