Clean up debug features
Introduce a GTK_DEBUG_CHECK() macro and use it to check for GTK_DEBUG flags everywhere. Also guard all such places by
This commit is contained in:
@ -59,12 +59,15 @@ typedef enum {
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
|
||||
#define GTK_NOTE(type,action) G_STMT_START { \
|
||||
if (gtk_get_debug_flags () & GTK_DEBUG_##type) \
|
||||
#define GTK_DEBUG_CHECK(type) G_UNLIKELY (gtk_get_debug_flags () & GTK_DEBUG_##type)
|
||||
|
||||
#define GTK_NOTE(type,action) G_STMT_START { \
|
||||
if (GTK_DEBUG_CHECK (type)) \
|
||||
{ action; }; } G_STMT_END
|
||||
|
||||
#else /* !G_ENABLE_DEBUG */
|
||||
|
||||
#define GTK_DEBUG_CHECK(type) 0
|
||||
#define GTK_NOTE(type, action)
|
||||
|
||||
#endif /* G_ENABLE_DEBUG */
|
||||
|
Reference in New Issue
Block a user