diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-02-27 19:02:01 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-02-27 19:02:01 +0100 |
| commit | cd8c36fc500dc0df5fb4232a8b1b94ab89495737 (patch) | |
| tree | 15a83f3eecbc3e55985a36f2083fb4a16ddbd41b /src/assert.hh | |
| parent | 6f48407f55bf57b6cd1cd01f4e327c8137d592ac (diff) | |
Add a debug option to Makefile, and use KAK_DEBUG define to remove debug code
Diffstat (limited to 'src/assert.hh')
| -rw-r--r-- | src/assert.hh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/assert.hh b/src/assert.hh index 182b58a4..52bdcf48 100644 --- a/src/assert.hh +++ b/src/assert.hh @@ -16,8 +16,14 @@ void on_assert_failed(const char* message); #undef assert #endif -#define assert(condition) \ - if (not (condition)) \ - on_assert_failed("assert failed \"" #condition "\" at " __FILE__ ":" TOSTRING(__LINE__)) +#ifdef KAK_DEBUG + #define assert(condition) \ + if (not (condition)) \ + on_assert_failed("assert failed \"" #condition \ + "\" at " __FILE__ ":" TOSTRING(__LINE__)) +#else + #define assert(condition) +#endif + #endif // assert_hh_INCLUDED |
