| 164 | } |
| 165 | |
| 166 | FORCE_INLINE void Relocate(const int32 capacity, int32 oldCount, int32 newCount) |
| 167 | { |
| 168 | T* newData = capacity != 0 ? static_cast<T*>(Allocator::Allocate(capacity * sizeof(T))) : nullptr; |
| 169 | if (oldCount) |
| 170 | { |
| 171 | if (newCount > 0) |
| 172 | Memory::MoveItems(newData, _data, newCount); |
| 173 | Memory::DestructItems(_data, oldCount); |
| 174 | } |
| 175 | Allocator::Free(_data); |
| 176 | _data = newData; |
| 177 | } |
| 178 | |
| 179 | FORCE_INLINE void Free() |
| 180 | { |
no test coverage detected