aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-03-27 07:28:39 -0700
committerChris Robinson <[email protected]>2022-03-29 22:13:34 -0700
commit1410a8e03aa2b8d27660a8524a690cb8d62750da (patch)
tree9934d488bb1f8f2d2f0c9f0fbb9f09acf50fee60 /common
parent6bc1787a3bc1d578cbafe2293549b8999cf3860e (diff)
Slightly improve code flow for ASSUME
Diffstat (limited to 'common')
-rw-r--r--common/opthelpers.h2
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