From dca22e08eb96a401406ef7fa62c59eea1b837f7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Fri, 5 Aug 2016 16:04:39 +0200 Subject: Use Common::Flag and Common::Event when possible Replaces old and simple usages of std::atomic with Common::Flag (which was introduced after the initial usage), so it's clear that the variable is a flag and because Common::Flag is well tested. This also replaces the ready logic in WiimoteReal with Common::Event since it was basically just unnecessarily reimplementing Common::Event. --- Source/Core/VideoCommon/AsyncRequests.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoCommon/AsyncRequests.cpp') diff --git a/Source/Core/VideoCommon/AsyncRequests.cpp b/Source/Core/VideoCommon/AsyncRequests.cpp index 32f407373b..d88bb7aa50 100644 --- a/Source/Core/VideoCommon/AsyncRequests.cpp +++ b/Source/Core/VideoCommon/AsyncRequests.cpp @@ -19,7 +19,7 @@ AsyncRequests::AsyncRequests() : m_enable(false), m_passthrough(true) void AsyncRequests::PullEventsInternal() { std::unique_lock lock(m_mutex); - m_empty.store(true); + m_empty.Set(); while (!m_queue.empty()) { @@ -76,7 +76,7 @@ void AsyncRequests::PushEvent(const AsyncRequests::Event& event, bool blocking) return; } - m_empty.store(false); + m_empty.Clear(); m_wake_me_up_again |= blocking; if (!m_enable) -- cgit v1.2.3