summaryrefslogtreecommitdiffstats
path: root/src/compositor
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2019-07-03 19:30:43 +0200
committerMarc Mutz <marc.mutz@kdab.com>2019-07-16 07:17:50 +0200
commitcc668a5754c3fb7a49e57b9d9802dea58215bd97 (patch)
tree455dd0f47d83ecc229ad36100995b33d540740e6 /src/compositor
parent4cf9a701bd3f4017afcd69285eeba9ee85d9da52 (diff)
Port from implicit to explicit atomic operations
The old code used the implicit conversions from QAtomicInteger<T> to T, and vice versa. The semantics of these differ from the ones std::atomic uses, so we're going to deprecate these, like we did for load() and store(), too. This patch fixes some users of these APIs before we deprecate them. Change-Id: Iab07e00d5f59d5de73233571bca723f94f76a265 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/compositor')
-rw-r--r--src/compositor/wayland_wrapper/qwlclientbuffer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compositor/wayland_wrapper/qwlclientbuffer.cpp b/src/compositor/wayland_wrapper/qwlclientbuffer.cpp
index cb1ee3da0..ef6b26483 100644
--- a/src/compositor/wayland_wrapper/qwlclientbuffer.cpp
+++ b/src/compositor/wayland_wrapper/qwlclientbuffer.cpp
@@ -81,7 +81,7 @@ void ClientBuffer::setDestroyed()
m_committed = false;
m_buffer = nullptr;
- if (!m_refCount)
+ if (!m_refCount.loadAcquire())
delete this;
}