Ndk/Entity: Fix arguments forwarding when constructing a component
Former-commit-id: b942a4659ebf7f1575c34b000e3efe9e2559a1d6
This commit is contained in:
parent
8c345964ef
commit
c919af8085
|
|
@ -15,7 +15,7 @@ namespace Ndk
|
|||
static_assert(std::is_base_of<BaseComponent, ComponentType>(), "ComponentType is not a component");
|
||||
|
||||
// Allocation et affectation du component
|
||||
std::unique_ptr<ComponentType> ptr(new ComponentType(std::forward(args)...));
|
||||
std::unique_ptr<ComponentType> ptr(new ComponentType(std::forward<Args>(args)...));
|
||||
return static_cast<ComponentType&>(AddComponent(std::move(ptr)));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue