Skip to content

Commit da380f6

Browse files
Fixed a warning in BlockMetadata_TLSF::WriteAllocationInfoToJson
Fixes #67 - thanks @ttcvetkov
1 parent ffee081 commit da380f6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/D3D12MemAlloc.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5030,7 +5030,8 @@ void BlockMetadata_TLSF::WriteAllocationInfoToJson(JsonWriter& json) const
50305030
}
50315031
D3D12MA_ASSERT(i == 0);
50325032

5033-
PrintDetailedMap_Begin(json, GetSumFreeSize(), GetAllocationCount(), m_BlocksFreeCount + static_cast<bool>(m_NullBlock->size));
5033+
PrintDetailedMap_Begin(json, GetSumFreeSize(), GetAllocationCount(), m_BlocksFreeCount +
5034+
(m_NullBlock->size > 0 ? 1 : 0));
50345035
for (; i < blockCount; ++i)
50355036
{
50365037
Block* block = blockList[i];

0 commit comments

Comments
 (0)