From 719736704051d94ad914720ccb3d2c959dca4d96 Mon Sep 17 00:00:00 2001 From: SachinVin <26602104+SachinVin@users.noreply.github.com> Date: Sat, 22 Apr 2023 14:36:27 +0530 Subject: [PATCH] assert.h: add [[unlikely]] (#6454) clang format assert --- src/common/assert.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/assert.h b/src/common/assert.h index 1533cb569..29efa82cd 100644 --- a/src/common/assert.h +++ b/src/common/assert.h @@ -14,7 +14,7 @@ #define ASSERT(_a_) \ do \ - if (!(_a_)) { \ + if (!(_a_)) [[unlikely]] { \ []() CITRA_NO_INLINE { \ LOG_CRITICAL(Debug, "Assertion Failed!"); \ Crash(); \ @@ -25,7 +25,7 @@ #define ASSERT_MSG(_a_, ...) \ do \ - if (!(_a_)) { \ + if (!(_a_)) [[unlikely]] { \ [&]() CITRA_NO_INLINE { \ LOG_CRITICAL(Debug, "Assertion Failed!\n" __VA_ARGS__); \ Crash(); \