Browse Source

add assert.h component

In order to allow seamless assert() usage in release builds without the
need for fiddling with CMake C flags as CMake adds -DNDEBUG switch in
release builds which disable assert().

Signed-off-by: Petr Štetiar <ynezz@true.cz>
master
Petr Štetiar 2 years ago
parent
commit
8baeeea1f5
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      assert.h

+ 9
- 0
assert.h View File

@ -0,0 +1,9 @@
#pragma once
#ifdef NDEBUG
#undef NDEBUG
#include <assert.h>
#define NDEBUG
#else
#include <assert.h>
#endif

Loading…
Cancel
Save