Skip to content

Commit 228a1b6

Browse files
Merge pull request #254 from MennoVink/master
C4062 fix
2 parents 42be483 + 11cbcfc commit 228a1b6

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

include/vk_mem_alloc.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5879,9 +5879,14 @@ class VmaMappingHysteresis
58795879
void PostMinorCounter()
58805880
{
58815881
if(m_MinorCounter < m_MajorCounter)
5882+
{
58825883
++m_MinorCounter;
5884+
}
58835885
else if(m_MajorCounter > 0)
5884-
--m_MajorCounter, --m_MinorCounter;
5886+
{
5887+
--m_MajorCounter;
5888+
--m_MinorCounter;
5889+
}
58855890
}
58865891
};
58875892

@@ -13841,6 +13846,9 @@ bool VmaDefragmentationContext_T::ComputeDefragmentation_Extensive(VmaBlockVecto
1384113846
}
1384213847
break;
1384313848
}
13849+
case StateExtensive::Operation::Cleanup:
13850+
// Cleanup is handled below so that other operations may reuse the cleanup code. This case is here to prevent the unhandled enum value warning (C4062).
13851+
break;
1384413852
}
1384513853

1384613854
if (vectorState.operation == StateExtensive::Operation::Cleanup)

0 commit comments

Comments
 (0)