define customized fluid_return_if_fail

unlike glib's g_return_if_fail, dont log to console if condition fails
This commit is contained in:
derselbst 2017-11-07 21:11:49 +01:00
parent 1b2a098c7c
commit b1d0db7d5c

View file

@ -56,8 +56,6 @@ void fluid_time_config(void);
/* Misc */
#define fluid_return_val_if_fail g_return_val_if_fail
#define fluid_return_if_fail g_return_if_fail
#define FLUID_INLINE inline
#define FLUID_POINTER_TO_UINT GPOINTER_TO_UINT
#define FLUID_UINT_TO_POINTER GUINT_TO_POINTER
@ -70,6 +68,15 @@ void fluid_time_config(void);
#define FLUID_LE32TOH(x) GINT32_FROM_LE(x)
#define FLUID_LE16TOH(x) GINT16_FROM_LE(x)
#define fluid_return_val_if_fail(cond, val) \
if(cond) \
; \
else \
return val
#define fluid_return_if_fail(cond) fluid_return_val_if_fail(cond, ((void)(0)))
/*
* Utility functions
*/