aboutsummaryrefslogtreecommitdiffstats
path: root/core/except.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-03-01 11:35:39 -0800
committerChris Robinson <[email protected]>2023-03-01 11:35:39 -0800
commitfde74453a62a1ce4b5efaac0ec1835b9f5731e25 (patch)
treeed74db646800b78ca8651bb5291453927f48cd93 /core/except.cpp
parentec9c421d312d6df701631877f6ce6256355101dc (diff)
Use macros for the likely/unlikely attributes
The syntax parser for GCC 8 (and earlier?) fails when these attributes are in certain places.
Diffstat (limited to 'core/except.cpp')
-rw-r--r--core/except.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/except.cpp b/core/except.cpp
index ba4759a3..45fd4eb5 100644
--- a/core/except.cpp
+++ b/core/except.cpp
@@ -18,7 +18,7 @@ void base_exception::setMessage(const char* msg, std::va_list args)
std::va_list args2;
va_copy(args2, args);
int msglen{std::vsnprintf(nullptr, 0, msg, args)};
- if(msglen > 0) [[likely]]
+ if(msglen > 0) LIKELY
{
mMessage.resize(static_cast<size_t>(msglen)+1);
std::vsnprintf(const_cast<char*>(mMessage.data()), mMessage.length(), msg, args2);