From d11beca85263c4decc0f27a3aec146ce49caa96d Mon Sep 17 00:00:00 2001 From: Joao Matos Date: Sun, 24 Aug 2025 16:11:27 +0100 Subject: [PATCH] FastSignals: Replace ATOMIC_VAR_INIT usages with C++ 20 brace init. Fixes the following issue: ``` Warning: /Users/runner/work/FreeCAD/FreeCAD/src/3rdParty/FastSignals/libfastsignals/include/fastsignals/connection.h:76:32: warning: macro 'ATOMIC_VAR_INIT' has been marked as deprecated [-Wdeprecated-pragma] 76 | std::atomic m_blocked = ATOMIC_VAR_INIT(false); | ^ ``` --- .../libfastsignals/include/fastsignals/connection.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/3rdParty/FastSignals/libfastsignals/include/fastsignals/connection.h b/src/3rdParty/FastSignals/libfastsignals/include/fastsignals/connection.h index 33357c3bf6..bc06075013 100644 --- a/src/3rdParty/FastSignals/libfastsignals/include/fastsignals/connection.h +++ b/src/3rdParty/FastSignals/libfastsignals/include/fastsignals/connection.h @@ -39,7 +39,7 @@ public: bool is_blocked() const noexcept; private: - std::atomic m_blockCounter = ATOMIC_VAR_INIT(0); + std::atomic m_blockCounter {0}; }; using impl_ptr = std::shared_ptr; @@ -73,7 +73,7 @@ private: void increment_if_blocked() const noexcept; std::weak_ptr m_connection; - std::atomic m_blocked = ATOMIC_VAR_INIT(false); + std::atomic m_blocked {false}; }; // Scoped connection keeps link between signal and slot and disconnects them in destructor.