mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 09:34:19 +00:00
Make dbg_assert
take a boolean
This commit is contained in:
parent
0ffab44dea
commit
dc6893ef28
|
@ -182,7 +182,7 @@ bool dbg_assert_has_failed()
|
||||||
return dbg_assert_failing.load(std::memory_order_acquire);
|
return dbg_assert_failing.load(std::memory_order_acquire);
|
||||||
}
|
}
|
||||||
|
|
||||||
void dbg_assert_imp(const char *filename, int line, int test, const char *msg)
|
void dbg_assert_imp(const char *filename, int line, bool test, const char *msg)
|
||||||
{
|
{
|
||||||
if(!test)
|
if(!test)
|
||||||
{
|
{
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
* @see dbg_break
|
* @see dbg_break
|
||||||
*/
|
*/
|
||||||
#define dbg_assert(test, msg) dbg_assert_imp(__FILE__, __LINE__, test, msg)
|
#define dbg_assert(test, msg) dbg_assert_imp(__FILE__, __LINE__, test, msg)
|
||||||
void dbg_assert_imp(const char *filename, int line, int test, const char *msg);
|
void dbg_assert_imp(const char *filename, int line, bool test, const char *msg);
|
||||||
|
|
||||||
#ifdef __clang_analyzer__
|
#ifdef __clang_analyzer__
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
Loading…
Reference in a new issue