From 8dc66b4d715f3b65ede506b98bc8ee2d0784e6d9 Mon Sep 17 00:00:00 2001 From: "d.levin256@gmail.com" Date: Tue, 17 Sep 2024 08:58:21 +0100 Subject: [PATCH] Direct initialization of atomics --- include/kfr/cometa/memory.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/kfr/cometa/memory.hpp b/include/kfr/cometa/memory.hpp index e7bc87dc..166a89af 100644 --- a/include/kfr/cometa/memory.hpp +++ b/include/kfr/cometa/memory.hpp @@ -17,10 +17,10 @@ namespace details struct memory_statistics { - std::atomic_uintptr_t allocation_count = ATOMIC_VAR_INIT(0); - std::atomic_uintptr_t allocation_size = ATOMIC_VAR_INIT(0); - std::atomic_uintptr_t deallocation_count = ATOMIC_VAR_INIT(0); - std::atomic_uintptr_t deallocation_size = ATOMIC_VAR_INIT(0); + std::atomic_uintptr_t allocation_count{ 0 }; + std::atomic_uintptr_t allocation_size{ 0 }; + std::atomic_uintptr_t deallocation_count{ 0 }; + std::atomic_uintptr_t deallocation_size{ 0 }; }; inline memory_statistics& get_memory_statistics()