Skip to content

Commit

Permalink
Add NDEBUG (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobLoach authored Jun 11, 2024
1 parent ab4f1b3 commit a4e50d1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/raylib-nuklear.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@
#endif // NK_INCLUDE_FIXED_TYPES

#ifndef NK_ASSERT
#define NK_ASSERT(condition) do { if (!(condition)) { TraceLog(LOG_WARNING, "NUKLEAR: Failed assert \"%s\" (%s:%i)", #condition, "nuklear.h", __LINE__); }} while (0)
#ifdef NDEBUG
#define NK_ASSERT(condition) ((void)0)
#else
#define NK_ASSERT(condition) do { if (!(condition)) { TraceLog(LOG_ERROR, "NUKLEAR: Failed assert \"%s\" (%s:%i)", #condition, "nuklear.h", __LINE__); }} while (0)
#endif // NDEBUG
#endif // NK_ASSERT

#include "nuklear.h"
Expand Down

0 comments on commit a4e50d1

Please sign in to comment.