Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions inc/crn_decomp.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,15 @@ void crnd_fail(const char* pExp, const char* pFile, unsigned line);
namespace crnd {
void crnd_assert(const char* pExp, const char* pFile, unsigned line);

// Define CRND_ASSERT if there is no user-supplied definition.
// Note that if there is a user-supplied definition, it is used even if NDEBUG is defined.
#ifndef CRND_ASSERT
#ifdef NDEBUG
#define CRND_ASSERT(x) ((void)0)
#undef CRND_ASSERTS_ENABLED
#else
#define CRND_ASSERT(_exp) (void)((!!(_exp)) || (crnd::crnd_assert(#_exp, __FILE__, __LINE__), 0))
#define CRND_ASSERTS_ENABLED
#endif
#endif // ifndef CRND_ASSERT

void crnd_trace(const char* pFmt, va_list args);
void crnd_trace(const char* pFmt, ...);
Expand Down