diff options
author | Chris Robinson <[email protected]> | 2022-12-05 14:51:03 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2022-12-05 14:51:03 -0800 |
commit | df6d61dd40b602af55f903564358b083bb8b37e4 (patch) | |
tree | 84113a098867e2ba82aa1f156911e94755fde727 /core/ambdec.cpp | |
parent | 73df39b8f8cefa0c0fca0e287b548063e9e62636 (diff) |
Use standard likely/unlikely attributes when available
Diffstat (limited to 'core/ambdec.cpp')
-rw-r--r-- | core/ambdec.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/ambdec.cpp b/core/ambdec.cpp index bcad1b55..8b7467ce 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(unlikely(msglen >= 0 && static_cast<size_t>(msglen) >= str.size()-plen)) + if(msglen >= 0 && static_cast<size_t>(msglen) >= str.size()-plen) [[alunlikely]] { str.resize(static_cast<size_t>(msglen) + plen + 1u); std::vsnprintf(&str[plen], str.size()-plen, fmt, args2); |