Core/MemoryHelper: Improve PlacementNew interface

Make it possible to deduce type from arguments


Former-commit-id: ed25b667fcacefcc39fddcb941ea11c40e6ce22b
This commit is contained in:
Lynix
2016-04-24 19:48:12 +02:00
parent b5f237b58f
commit 6d66063b2c
6 changed files with 9 additions and 9 deletions

View File

@@ -191,7 +191,7 @@ namespace Nz
inline T* MemoryPool::New(Args&&... args)
{
T* object = static_cast<T*>(Allocate(sizeof(T)));
PlacementNew<T>(object, std::forward<Args>(args)...);
PlacementNew(object, std::forward<Args>(args)...);
return object;
}