Commit 8cef977d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Avoid useless variable lookup when non debugging

parent eab8710b
...@@ -192,6 +192,7 @@ VLC_EXPORT( int, __var_TriggerCallback, ( vlc_object_t *, const char * ) ); ...@@ -192,6 +192,7 @@ VLC_EXPORT( int, __var_TriggerCallback, ( vlc_object_t *, const char * ) );
* helpers functions * helpers functions
*****************************************************************************/ *****************************************************************************/
#ifndef NDEBUG
/** /**
* This function assert the variable is of the expected type or it * This function assert the variable is of the expected type or it
* is not defined * is not defined
...@@ -202,6 +203,9 @@ static inline void __var_AssertType( vlc_object_t *p_obj, const char *psz_name, ...@@ -202,6 +203,9 @@ static inline void __var_AssertType( vlc_object_t *p_obj, const char *psz_name,
const int i_type = __var_Type( p_obj, psz_name ) & VLC_VAR_CLASS; const int i_type = __var_Type( p_obj, psz_name ) & VLC_VAR_CLASS;
assert( i_type == 0 || i_type == (i_expected&VLC_VAR_CLASS) ); assert( i_type == 0 || i_type == (i_expected&VLC_VAR_CLASS) );
} }
#else
# define __var_AssertType( o, n, e ) (void)(o, n, e)
#endif
/** /**
* Set the value of an integer variable * Set the value of an integer variable
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment