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. --- core/logging.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/logging.cpp') diff --git a/core/logging.cpp b/core/logging.cpp index ec53e5f6..34a95e5a 100644 --- a/core/logging.cpp +++ b/core/logging.cpp @@ -45,7 +45,7 @@ void al_print(LogLevel level, FILE *logfile, const char *fmt, ...) va_start(args, fmt); va_copy(args2, args); const int msglen{std::vsnprintf(msg.data(), msg.size(), fmt, args)}; - if(msglen >= 0 && static_cast(msglen) >= msg.size()) [[unlikely]] + if(msglen >= 0 && static_cast(msglen) >= msg.size()) UNLIKELY { dynmsg.resize(static_cast(msglen)+prefix.size() + 1u); -- cgit v1.2.3