From 403af13c9dc4e192907d8019ecb60e2a193c677e Mon Sep 17 00:00:00 2001 From: lizzie Date: Mon, 10 Nov 2025 21:22:57 +0000 Subject: [PATCH] [common] asserts now display expression + file of 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 93965c2ec9..87a3a71705 100644 --- a/src/common/assert.h +++ b/src/common/assert.h @@ -25,7 +25,7 @@ void AssertFailSoftImpl(); #define ASSERT(_a_) \ ([&]() YUZU_NO_INLINE { \ if (!(_a_)) [[unlikely]] { \ - LOG_CRITICAL(Debug, "Assert"); \ + LOG_CRITICAL(Debug, __FILE__ ":" #_a_ ": assert"); \ AssertFailSoftImpl(); \ } \ }()) @@ -33,7 +33,7 @@ void AssertFailSoftImpl(); #define ASSERT_MSG(_a_, ...) \ ([&]() YUZU_NO_INLINE { \ if (!(_a_)) [[unlikely]] { \ - LOG_CRITICAL(Debug, "Assert\n" __VA_ARGS__); \ + LOG_CRITICAL(Debug, __FILE__ ":" #_a_ ": assert\n" __VA_ARGS__); \ AssertFailSoftImpl(); \ } \ }())