From d2e7d57104f506d4066afe111fee969d4b081199 Mon Sep 17 00:00:00 2001 From: Michael Steenbeek Date: Thu, 14 Mar 2024 22:34:54 +0100 Subject: [PATCH] Close #21536: Replace ATOMIC_VAR_INIT() macro with constructor --- src/openrct2/core/FileIndex.hpp | 2 +- src/openrct2/network/Socket.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openrct2/core/FileIndex.hpp b/src/openrct2/core/FileIndex.hpp index 61acb843d4..18c9256a8d 100644 --- a/src/openrct2/core/FileIndex.hpp +++ b/src/openrct2/core/FileIndex.hpp @@ -206,7 +206,7 @@ private: size_t stepSize = 100; // Handpicked, seems to work well with 4/8 cores. - std::atomic processed = ATOMIC_VAR_INIT(0); + std::atomic processed{ 0 }; auto reportProgress = [&]() { const size_t completed = processed; diff --git a/src/openrct2/network/Socket.cpp b/src/openrct2/network/Socket.cpp index 55fb2cc8fd..38e53ea275 100644 --- a/src/openrct2/network/Socket.cpp +++ b/src/openrct2/network/Socket.cpp @@ -248,7 +248,7 @@ private: class TcpSocket final : public ITcpSocket, protected Socket { private: - std::atomic _status = ATOMIC_VAR_INIT(SocketStatus::Closed); + std::atomic _status{ SocketStatus::Closed }; uint16_t _listeningPort = 0; SOCKET _socket = INVALID_SOCKET;