mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
Merge pull request #11624 from jstine35/assert_macro_code_quality
Improved code quality of retro_assert macro
This commit is contained in:
commit
1f6cf5748e
@ -27,9 +27,7 @@
|
||||
|
||||
#ifdef RARCH_INTERNAL
|
||||
#include <stdio.h>
|
||||
#define retro_assert(cond) do { \
|
||||
if (!(cond)) { printf("Assertion failed at %s:%d.\n", __FILE__, __LINE__); abort(); } \
|
||||
} while(0)
|
||||
#define retro_assert(cond) ((void)( (cond) || (printf("Assertion failed at %s:%d.\n", __FILE__, __LINE__), abort(), 0) ))
|
||||
#else
|
||||
#define retro_assert(cond) assert(cond)
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user