Fix compile error

This commit is contained in:
Wojtek Figat
2021-02-11 16:48:21 +01:00
parent 04b650cbc3
commit 62acae10a5

View File

@@ -324,9 +324,7 @@ public:
void Append(T* data, int32 length)
{
if (length <= 0)
{
return;
}
if (Base::Length() == 0)
{
Copy(data, length);
@@ -337,16 +335,13 @@ public:
const auto prevLength = Base::_length;
Base::_length = prevLength + length;
Base::_data = Allocator::Allocate(Base::_length * sizeof(T));
Base::_data = (T*)Allocator::Allocate(Base::_length * sizeof(T));
Platform::MemoryCopy(Base::_data, prev, prevLength * sizeof(T));
Platform::MemoryCopy(Base::_data + prevLength * sizeof(T), data, length * sizeof(T));
if (_isAllocated && prev)
{
Allocator::Free(prev);
}
_isAllocated = true;
}