[*] Assertions should static_cast<bool> because if statements are implicitly castable to bool but literal bool types arent

This commit is contained in:
Reece Wilson 2021-07-05 14:34:05 +01:00
parent 22d03229ae
commit 613a4b1455

View File

@ -44,7 +44,7 @@
#define SysAssert(tru, ...) \ #define SysAssert(tru, ...) \
do \ do \
{ \ { \
SysAssertFileEx(__FILE__, __LINE__, __FUNCTION__, tru, ## __VA_ARGS__); \ SysAssertFileEx(__FILE__, __LINE__, __FUNCTION__, static_cast<bool>(tru), ## __VA_ARGS__); \
} while (0) } while (0)
/** /**
@ -83,7 +83,7 @@
#define SysAssert(tru, ...) \ #define SysAssert(tru, ...) \
do \ do \
{ \ { \
SysAssertEx(tru, ## __VA_ARGS__); \ SysAssertEx(static_cast<bool>(tru), ## __VA_ARGS__); \
} while (0) } while (0)
/** /**
@ -178,7 +178,7 @@
#define SysAssertExp(tru, ...) \ #define SysAssertExp(tru, ...) \
do \ do \
{ \ { \
SysAssertExpEx(_AUKCON_STRINGIFY_X(tru), tru, ## __VA_ARGS__); \ SysAssertExpEx(_AUKCON_STRINGIFY_X(tru), static_cast<bool>(tru), ## __VA_ARGS__); \
} while (0) } while (0)
/** /**