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. --- al/extension.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'al/extension.cpp') diff --git a/al/extension.cpp b/al/extension.cpp index 3a84ee08..3ead0af8 100644 --- a/al/extension.cpp +++ b/al/extension.cpp @@ -37,9 +37,9 @@ AL_API ALboolean AL_APIENTRY alIsExtensionPresent(const ALchar *extName) START_API_FUNC { ContextRef context{GetContextRef()}; - if(!context) [[unlikely]] return AL_FALSE; + if(!context) UNLIKELY return AL_FALSE; - if(!extName) [[unlikely]] + if(!extName) UNLIKELY { context->setError(AL_INVALID_VALUE, "NULL pointer"); return AL_FALSE; -- cgit v1.2.3