1
0
mirror of https://github.com/libretro/RetroArch synced 2025-03-02 19:13:34 +00:00

Merge pull request from jstine35/assert_macro_code_quality

Improved code quality of retro_assert macro
This commit is contained in:
Autechre 2020-11-27 15:40:36 +01:00 committed by GitHub
commit 1f6cf5748e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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