diff options
author | Chris Robinson <[email protected]> | 2022-03-27 07:28:39 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2022-03-29 22:13:34 -0700 |
commit | 1410a8e03aa2b8d27660a8524a690cb8d62750da (patch) | |
tree | 9934d488bb1f8f2d2f0c9f0fbb9f09acf50fee60 /common | |
parent | 6bc1787a3bc1d578cbafe2293549b8999cf3860e (diff) |
Slightly improve code flow for ASSUME
Diffstat (limited to 'common')
-rw-r--r-- | common/opthelpers.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/opthelpers.h b/common/opthelpers.h index ae14f1d9..726179de 100644 --- a/common/opthelpers.h +++ b/common/opthelpers.h @@ -44,7 +44,7 @@ constexpr bool unlikely(T&& expr) noexcept { return static_cast<bool>(std::forwa #elif defined(_MSC_VER) #define ASSUME __assume #elif defined(__GNUC__) -#define ASSUME(x) do { if(!(x)) __builtin_unreachable(); } while(0) +#define ASSUME(x) do { if(x) break; __builtin_unreachable(); } while(0) #else #define ASSUME(x) ((void)0) #endif |