aboutsummaryrefslogtreecommitdiffstats
path: root/core/ambdec.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/ambdec.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/ambdec.cpp')
-rw-r--r--core/ambdec.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/ambdec.cpp b/core/ambdec.cpp
index 5e2de6af..8ca182c4 100644
--- a/core/ambdec.cpp
+++ b/core/ambdec.cpp
@@ -61,7 +61,7 @@ al::optional<std::string> make_error(size_t linenum, const char *fmt, ...)
va_start(args, fmt);
va_copy(args2, args);
const int msglen{std::vsnprintf(&str[plen], str.size()-plen, fmt, args)};
- if(msglen >= 0 && static_cast<size_t>(msglen) >= str.size()-plen) [[unlikely]]
+ if(msglen >= 0 && static_cast<size_t>(msglen) >= str.size()-plen)
{
str.resize(static_cast<size_t>(msglen) + plen + 1u);
std::vsnprintf(&str[plen], str.size()-plen, fmt, args2);