Fix Array::ClearDelete on Clang

This commit is contained in:
2026-07-15 22:58:54 +02:00
parent da19395f98
commit 0b5dcbb533
2 changed files with 15 additions and 4 deletions
+1 -4
View File
@@ -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)
{
}
}