From 0716ea6dbc8a35427817c2ab0dcd81adb6c7f80a Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Mon, 18 Jan 2010 19:44:50 +0200 Subject: [PATCH] Remove used FIND_STRICT --- include/vlc_objects.h | 2 -- src/misc/objects.c | 23 ++++++++++------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/include/vlc_objects.h b/include/vlc_objects.h index 3a3d147639..17e7cd964d 100644 --- a/include/vlc_objects.h +++ b/include/vlc_objects.h @@ -45,8 +45,6 @@ #define FIND_CHILD 0x0002 #define FIND_ANYWHERE 0x0003 -#define FIND_STRICT 0x0010 - /* Object flags */ #define OBJECT_FLAGS_NODBG 0x0001 #define OBJECT_FLAGS_QUIET 0x0002 diff --git a/src/misc/objects.c b/src/misc/objects.c index 59391df673..5afc444bca 100644 --- a/src/misc/objects.c +++ b/src/misc/objects.c @@ -442,17 +442,15 @@ void * __vlc_object_find( vlc_object_t *p_this, int i_type, int i_mode ) vlc_object_t *p_found; /* If we are of the requested type ourselves, don't look further */ - if( !(i_mode & FIND_STRICT) - && vlc_internals (p_this)->i_object_type == i_type ) + if( vlc_internals (p_this)->i_object_type == i_type ) { vlc_object_hold( p_this ); return p_this; } /* Otherwise, recursively look for the object */ - if ((i_mode & 0x000f) == FIND_ANYWHERE) - return vlc_object_find (p_this->p_libvlc, i_type, - (i_mode & ~0x000f)|FIND_CHILD); + if (i_mode == FIND_ANYWHERE) + return vlc_object_find (p_this->p_libvlc, i_type, FIND_CHILD); libvlc_lock (p_this->p_libvlc); p_found = FindObject( p_this, i_type, i_mode ); @@ -498,7 +496,7 @@ vlc_object_t *vlc_object_find_name( vlc_object_t *p_this, * Use a libvlc address variable instead for that sort of things! */ msg_Warn( p_this, "%s(%s) is not safe!", __func__, psz_name ); /* If have the requested name ourselves, don't look further */ - if( !(i_mode & FIND_STRICT) && !objnamecmp(p_this, psz_name) ) + if( !objnamecmp(p_this, psz_name) ) { vlc_object_hold( p_this ); return p_this; @@ -507,7 +505,7 @@ vlc_object_t *vlc_object_find_name( vlc_object_t *p_this, libvlc_lock (p_this->p_libvlc); /* Otherwise, recursively look for the object */ - if( (i_mode & 0x000f) == FIND_ANYWHERE ) + if( i_mode == FIND_ANYWHERE ) { vlc_object_t *p_root = p_this; @@ -518,12 +516,11 @@ vlc_object_t *vlc_object_find_name( vlc_object_t *p_this, p_root = p_root->p_parent; } - p_found = FindObjectName( p_root, psz_name, - (i_mode & ~0x000f)|FIND_CHILD ); + p_found = FindObjectName( p_root, psz_name, FIND_CHILD ); if( p_found == NULL && p_root != VLC_OBJECT( p_this->p_libvlc ) ) { p_found = FindObjectName( VLC_OBJECT( p_this->p_libvlc ), - psz_name, (i_mode & ~0x000f)|FIND_CHILD ); + psz_name, FIND_CHILD ); } } else @@ -708,7 +705,7 @@ vlc_list_t * vlc_list_find( vlc_object_t *p_this, int i_type, int i_mode ) int i_count = 0; /* Look for the objects */ - switch( i_mode & 0x000f ) + switch( i_mode ) { case FIND_ANYWHERE: return vlc_list_find (VLC_OBJECT(p_this->p_libvlc), i_type, FIND_CHILD); @@ -915,7 +912,7 @@ static vlc_object_t * FindObject( vlc_object_t *p_this, int i_type, int i_mode ) int i; vlc_object_t *p_tmp; - switch( i_mode & 0x000f ) + switch( i_mode ) { case FIND_PARENT: p_tmp = p_this->p_parent; @@ -968,7 +965,7 @@ static vlc_object_t * FindObjectName( vlc_object_t *p_this, int i; vlc_object_t *p_tmp; - switch( i_mode & 0x000f ) + switch( i_mode ) { case FIND_PARENT: p_tmp = p_this->p_parent; -- 2.39.5