mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-11 21:31:18 +00:00
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:
parent
1b2a098c7c
commit
b1d0db7d5c
1 changed files with 9 additions and 2 deletions
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue