Refactored VmaBlockVector::SortByFreeSize to fix compilation on XCode 13.4

Fixes #269. Thanks @richard-lunarg !
This commit is contained in:
Adam Sawicki 2022-05-26 11:11:32 +02:00
parent 0bbde1750e
commit b77238c92c

View File

@ -12732,7 +12732,7 @@ void VmaBlockVector::IncrementallySortBlocks()
void VmaBlockVector::SortByFreeSize() void VmaBlockVector::SortByFreeSize()
{ {
VMA_SORT(m_Blocks.begin(), m_Blocks.end(), VMA_SORT(m_Blocks.begin(), m_Blocks.end(),
[](auto* b1, auto* b2) [](VmaDeviceMemoryBlock* b1, VmaDeviceMemoryBlock* b2) -> bool
{ {
return b1->m_pMetadata->GetSumFreeSize() < b2->m_pMetadata->GetSumFreeSize(); return b1->m_pMetadata->GetSumFreeSize() < b2->m_pMetadata->GetSumFreeSize();
}); });