From df6d61dd40b602af55f903564358b083bb8b37e4 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 5 Dec 2022 14:51:03 -0800 Subject: Use standard likely/unlikely attributes when available --- al/buffer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'al/buffer.cpp') diff --git a/al/buffer.cpp b/al/buffer.cpp index d427f214..77b484d0 100644 --- a/al/buffer.cpp +++ b/al/buffer.cpp @@ -1766,7 +1766,7 @@ START_API_FUNC continue; const auto al_buffer = LookupBuffer(device, buffer); - if (!al_buffer) + if(!al_buffer) [[alunlikely]] { ERR(EAX_PREFIX "Invalid buffer ID %u.\n", buffer); return ALC_FALSE; @@ -1782,7 +1782,7 @@ START_API_FUNC * buffer ID is specified multiple times in the provided list, it * counts each instance as more memory that needs to fit in X-RAM. */ - if(unlikely(std::numeric_limits::max()-al_buffer->OriginalSize < total_needed)) + if(std::numeric_limits::max()-al_buffer->OriginalSize < total_needed) [[alunlikely]] { context->setError(AL_OUT_OF_MEMORY, EAX_PREFIX "Buffer size overflow (%u + %zu)\n", al_buffer->OriginalSize, total_needed); -- cgit v1.2.3