Ndk/Entity: Fix arguments forwarding when constructing a component
Former-commit-id: b942a4659ebf7f1575c34b000e3efe9e2559a1d6
This commit is contained in:
@@ -15,7 +15,7 @@ namespace Ndk
|
|||||||
static_assert(std::is_base_of<BaseComponent, ComponentType>(), "ComponentType is not a component");
|
static_assert(std::is_base_of<BaseComponent, ComponentType>(), "ComponentType is not a component");
|
||||||
|
|
||||||
// Allocation et affectation du 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)));
|
return static_cast<ComponentType&>(AddComponent(std::move(ptr)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user