From 5e03941701c112083b5dce14257fd8c51262f04f Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 30 Dec 2018 21:58:14 -0800 Subject: Use an atomic bool on things that only take true or false --- Alc/backends/null.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Alc/backends/null.cpp') diff --git a/Alc/backends/null.cpp b/Alc/backends/null.cpp index 7f02ad62..cba204f6 100644 --- a/Alc/backends/null.cpp +++ b/Alc/backends/null.cpp @@ -55,7 +55,7 @@ struct NullBackend final : public BackendBase { ALCboolean start() override; void stop() override; - std::atomic mKillNow{AL_TRUE}; + std::atomic mKillNow{true}; std::thread mThread; static constexpr inline const char *CurrentPrefix() noexcept { return "NullBackend::"; } @@ -129,7 +129,7 @@ ALCboolean NullBackend::reset() ALCboolean NullBackend::start() { try { - mKillNow.store(AL_FALSE, std::memory_order_release); + mKillNow.store(false, std::memory_order_release); mThread = std::thread{std::mem_fn(&NullBackend::mixerProc), this}; return ALC_TRUE; } @@ -143,7 +143,7 @@ ALCboolean NullBackend::start() void NullBackend::stop() { - if(mKillNow.exchange(AL_TRUE, std::memory_order_acq_rel) || !mThread.joinable()) + if(mKillNow.exchange(true, std::memory_order_acq_rel) || !mThread.joinable()) return; mThread.join(); } -- cgit v1.2.3