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 );
* 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;
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;
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
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);
int i;
vlc_object_t *p_tmp;
- switch( i_mode & 0x000f )
+ switch( i_mode )
{
case FIND_PARENT:
p_tmp = p_this->p_parent;
int i;
vlc_object_t *p_tmp;
- switch( i_mode & 0x000f )
+ switch( i_mode )
{
case FIND_PARENT:
p_tmp = p_this->p_parent;