Fix initialization order in VmaDefragmentationAlgorithm_Generic constructor

See #236
This commit is contained in:
Adam Sawicki 2022-02-15 11:26:29 +01:00
parent cebd53ce67
commit e51e4d3b40

View File

@ -13239,11 +13239,11 @@ VmaDefragmentationAlgorithm_Generic::VmaDefragmentationAlgorithm_Generic(
VmaBlockVector* pBlockVector,
bool overlappingMoveSupported)
: VmaDefragmentationAlgorithm(hAllocator, pBlockVector),
m_Blocks(VmaStlAllocator<BlockInfo*>(hAllocator->GetAllocationCallbacks())),
m_AllocationCount(0),
m_AllAllocations(false),
m_BytesMoved(0),
m_AllocationsMoved(0),
m_Blocks(VmaStlAllocator<BlockInfo*>(hAllocator->GetAllocationCallbacks()))
m_AllocationsMoved(0)
{
// Create block info for each block.
const size_t blockCount = m_pBlockVector->m_Blocks.size();