From d05594eafe75eb14d1380605141fd9a76cb3c149 Mon Sep 17 00:00:00 2001 From: jules Date: Tue, 26 Sep 2017 12:24:52 +0100 Subject: [PATCH] Fixed a problem in a static assert in Atomic. --- modules/juce_core/memory/juce_Atomic.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/juce_core/memory/juce_Atomic.h b/modules/juce_core/memory/juce_Atomic.h index 353ca2a0d5..585b135504 100644 --- a/modules/juce_core/memory/juce_Atomic.h +++ b/modules/juce_core/memory/juce_Atomic.h @@ -45,7 +45,7 @@ namespace juce Atomic() noexcept : value (0) {} /** Creates a new value, with a given initial value. */ - Atomic (const Type initialValue) noexcept : value (initialValue) {} + Atomic (Type initialValue) noexcept : value (initialValue) {} /** Copies another value (atomically). */ Atomic (const Atomic& other) noexcept : value (other.get()) {} @@ -54,7 +54,7 @@ namespace juce ~Atomic() noexcept { #if __cpp_lib_atomic_is_always_lock_free - static_assert (std::atomic::is_always_lock_free(), + static_assert (std::atomic::is_always_lock_free, "This class can only be used for lock-free types"); #endif } @@ -105,7 +105,7 @@ namespace juce } /** Copies another value into this one (atomically). */ - Atomic& operator= (const Type newValue) noexcept + Atomic& operator= (Type newValue) noexcept { value = newValue; return *this; @@ -128,7 +128,7 @@ namespace juce Internally this calls std::atomic_thread_fence with memory_order_seq_cst (the strictest std::memory_order). */ - void memoryBarrier() noexcept { atomic_thread_fence (std::memory_order_seq_cst); } + void memoryBarrier() noexcept { atomic_thread_fence (std::memory_order_seq_cst); } /** The std::atomic object that this class operates on. */ std::atomic value;