Browse Source

Update src/dynarmic/src/dynarmic/common/assert.h

NOISY warning on NINJA MSVC build log.
Complement for PR 3567. Now in another place.

D:\dev\eden\src\dynarmic\src\dynarmic\backend\x64\emit_x64_vector_floating_point.cpp(207): warning C4127: conditional expression is constant
D:\dev\eden\src\dynarmic\src\dynarmic\backend\x64\emit_x64_vector_floating_point.cpp(207): note: consider using 'if constexpr' statement instead

Signed-off-by: xbzk <xbzk@eden-emu.dev>
pull/3595/head
xbzk 2 weeks ago
committed by crueter
parent
commit
f6b37afd18
  1. 7
      src/dynarmic/src/dynarmic/common/assert.h

7
src/dynarmic/src/dynarmic/common/assert.h

@ -9,7 +9,12 @@
// TODO: Use source_info? // TODO: Use source_info?
[[noreturn]] void assert_terminate_impl(const char* s); [[noreturn]] void assert_terminate_impl(const char* s);
#ifndef ASSERT #ifndef ASSERT
# define ASSERT(expr) do if(!(expr)) [[unlikely]] assert_terminate_impl(__FILE__ ": " #expr); while(0)
# define ASSERT(expr) \
do { \
const bool cond = static_cast<bool>(expr); \
if(!cond) \
[[unlikely]] assert_terminate_impl(__FILE__ ": " #expr); \
} while(0)
#endif #endif
#ifndef UNREACHABLE #ifndef UNREACHABLE
# ifdef _MSC_VER # ifdef _MSC_VER

Loading…
Cancel
Save