[*] Fix AuSPtr<T> Heap::NewClass(Args &&...args)

This commit is contained in:
Reece Wilson 2023-12-01 06:50:39 +00:00
parent c32022a8e4
commit 019cba1677

View File

@ -89,9 +89,9 @@ namespace Aurora::Memory
}
template <class T, class ...Args>
AuSPtr<T> NewClass(T &ref, Args &&...args)
AuSPtr<T> NewClass(Args &&...args)
{
void * pPtr;
void *pPtr;
if constexpr (AuIsClass_v<T>)
{
@ -111,7 +111,7 @@ namespace Aurora::Memory
return {};
}
return ToSmartPointer(pPtr, true);
return ToSmartPointer((T *)pPtr, true);
}