Use list initialization for atomics
diff --git a/include/D3D12MemAlloc.h b/include/D3D12MemAlloc.h
index 24e1698..a8a63d5 100644
--- a/include/D3D12MemAlloc.h
+++ b/include/D3D12MemAlloc.h
@@ -145,7 +145,7 @@
 protected:

     virtual void ReleaseThis() { delete this; }

 private:

-    D3D12MA_ATOMIC_UINT32 m_RefCount = 1;

+    D3D12MA_ATOMIC_UINT32 m_RefCount = {1};

 };

 } // namespace D3D12MA

 

diff --git a/src/D3D12MemAlloc.cpp b/src/D3D12MemAlloc.cpp
index 097e859..060de01 100644
--- a/src/D3D12MemAlloc.cpp
+++ b/src/D3D12MemAlloc.cpp
@@ -6120,7 +6120,7 @@
     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 @@
     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);