[*] Build error

This commit is contained in:
Reece Wilson 2022-01-18 20:04:14 +00:00
parent 9065d95851
commit f10c00f518

View File

@ -102,7 +102,7 @@ namespace Aurora::Memory
AuSPtr<T> ToSmartPointer(T *in, bool pinThis = true)
{
if (in == nullptr) return {};
auto heapHandle = pinThis ? GetSelfReference() : {};
auto heapHandle = pinThis ? GetSelfReference() : AuSPtr<Heap> {};
return std::shared_ptr<T>(in,
[heapHandle, in, this](T *delt)
{
@ -117,7 +117,7 @@ namespace Aurora::Memory
template<typename T>
static AuSPtr<T> ToSmartPointer(AuSPtr<Heap> heap, T *in, bool pinHeap = true)
{
auto handle = pinHeap ? heap : {};
auto handle = pinHeap ? heap : AuSPtr<Heap> {};
auto ptr = heap.get(); // so long as in is a valid pointer within the heap, this is fine
return std::shared_ptr<T>(in,
[handle, ptr](T *delt)