| 10 | // Moves the data from the source allocation to the destination allocation. |
| 11 | template<typename T, typename AllocationType> |
| 12 | inline void MoveToEmpty(typename AllocationType::template Data<T>& to, typename AllocationType::template Data<T>& from, const int32 fromCount, const int32 fromCapacity) |
| 13 | { |
| 14 | if IF_CONSTEXPR (AllocationType::HasSwap) |
| 15 | to.Swap(from); |
| 16 | else |
| 17 | { |
| 18 | to.Allocate(fromCapacity); |
| 19 | Memory::MoveItems(to.Get(), from.Get(), fromCount); |
| 20 | Memory::DestructItems(from.Get(), fromCount); |
| 21 | from.Free(); |
| 22 | } |
| 23 | } |
| 24 | } |
no test coverage detected