Fix Array::ClearDelete on Clang
This commit is contained in:
@@ -370,10 +370,7 @@ public:
|
||||
{
|
||||
T* data = Get();
|
||||
for (int32 i = 0; i < _count; i++)
|
||||
{
|
||||
if (data[i])
|
||||
Delete(data[i]);
|
||||
}
|
||||
AllocationUtils::DeleteHelper(data[i]);
|
||||
Clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -21,4 +21,18 @@ namespace AllocationUtils
|
||||
from.Free();
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static typename TEnableIf<TIsPointer<T>::Value>::Type DeleteHelper(T& ptr)
|
||||
{
|
||||
if (ptr)
|
||||
{
|
||||
Memory::DestructItem(ptr);
|
||||
Allocator::Free(ptr);
|
||||
}
|
||||
}
|
||||
template<typename T>
|
||||
static typename TEnableIf<!TIsPointer<T>::Value>::Type DeleteHelper(T& ptr)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user