Use list initialization for atomics

This commit is contained in:
Marcin Kienast 2022-07-15 17:50:59 +02:00
parent 434fd4eba4
commit 3b129882ef
2 changed files with 3 additions and 3 deletions

View File

@ -145,7 +145,7 @@ public:
protected:
virtual void ReleaseThis() { delete this; }
private:
D3D12MA_ATOMIC_UINT32 m_RefCount = 1;
D3D12MA_ATOMIC_UINT32 m_RefCount = {1};
};
} // namespace D3D12MA

View File

@ -6120,7 +6120,7 @@ private:
D3D12MA_ATOMIC_UINT64 m_BlockBytes[DXGI_MEMORY_SEGMENT_GROUP_COUNT] = {};
D3D12MA_ATOMIC_UINT64 m_AllocationBytes[DXGI_MEMORY_SEGMENT_GROUP_COUNT] = {};
D3D12MA_ATOMIC_UINT32 m_OperationsSinceBudgetFetch = 0;
D3D12MA_ATOMIC_UINT32 m_OperationsSinceBudgetFetch = {0};
D3D12MA_RW_MUTEX m_BudgetMutex;
UINT64 m_D3D12Usage[DXGI_MEMORY_SEGMENT_GROUP_COUNT] = {};
UINT64 m_D3D12Budget[DXGI_MEMORY_SEGMENT_GROUP_COUNT] = {};
@ -6355,7 +6355,7 @@ class AllocatorPimpl
friend class Allocator;
friend class Pool;
public:
std::atomic_uint32_t m_RefCount = 1;
std::atomic_uint32_t m_RefCount = {1};
CurrentBudgetData m_Budget;
AllocatorPimpl(const ALLOCATION_CALLBACKS& allocationCallbacks, const ALLOCATOR_DESC& desc);