mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Assertions: Add preprocessor definitions for checking when assertions are enabled
This commit is contained in:
parent
b5bcf621f3
commit
572f1c985c
1 changed files with 5 additions and 0 deletions
|
|
@ -179,12 +179,15 @@ namespace juce
|
|||
*/
|
||||
#define jassertquiet(expression) JUCE_BLOCK_WITH_FORCED_SEMICOLON (if (! (expression)) jassertfalse;)
|
||||
|
||||
#define JUCE_ASSERTIONS_ENABLED 1
|
||||
|
||||
#else
|
||||
//==============================================================================
|
||||
// If debugging is disabled, these dummy debug and assertion macros are used..
|
||||
|
||||
#define DBG(textToWrite)
|
||||
#define jassertfalse JUCE_BLOCK_WITH_FORCED_SEMICOLON (JUCE_LOG_CURRENT_ASSERTION;)
|
||||
#define JUCE_ASSERTIONS_ENABLED 0
|
||||
|
||||
#if JUCE_LOG_ASSERTIONS
|
||||
#define jassert(expression) JUCE_BLOCK_WITH_FORCED_SEMICOLON (if (! (expression)) jassertfalse;)
|
||||
|
|
@ -196,6 +199,8 @@ namespace juce
|
|||
|
||||
#endif
|
||||
|
||||
#define JUCE_ASSERTIONS_ENABLED_OR_LOGGED JUCE_ASSERTIONS_ENABLED || JUCE_LOG_ASSERTIONS
|
||||
|
||||
//==============================================================================
|
||||
#ifndef DOXYGEN
|
||||
#define JUCE_JOIN_MACRO_HELPER(a, b) a ## b
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue