From fde74453a62a1ce4b5efaac0ec1835b9f5731e25 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 1 Mar 2023 11:35:39 -0800 Subject: Use macros for the likely/unlikely attributes The syntax parser for GCC 8 (and earlier?) fails when these attributes are in certain places. --- alc/backends/jack.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'alc/backends/jack.cpp') diff --git a/alc/backends/jack.cpp b/alc/backends/jack.cpp index 95796862..791002ca 100644 --- a/alc/backends/jack.cpp +++ b/alc/backends/jack.cpp @@ -345,7 +345,7 @@ int JackPlayback::processRt(jack_nframes_t numframes) noexcept out[numchans++] = static_cast(jack_port_get_buffer(port, numframes)); } - if(mPlaying.load(std::memory_order_acquire)) [[likely]] + if(mPlaying.load(std::memory_order_acquire)) LIKELY mDevice->renderSamples({out.data(), numchans}, static_cast(numframes)); else { @@ -369,7 +369,7 @@ int JackPlayback::process(jack_nframes_t numframes) noexcept } jack_nframes_t total{0}; - if(mPlaying.load(std::memory_order_acquire)) [[likely]] + if(mPlaying.load(std::memory_order_acquire)) LIKELY { auto data = mRing->getReadVector(); jack_nframes_t todo{minu(numframes, static_cast(data.first.len))}; -- cgit v1.2.3