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

playlist: remove constant playlist_ItemFindFromInputAndRoot() parameter

parent 25e9e187
......@@ -330,7 +330,7 @@ int playlist_DeleteFromInput( playlist_t *p_playlist, input_item_t *p_input,
PL_LOCK_IF( !b_locked );
p_item = playlist_ItemFindFromInputAndRoot( p_playlist, p_input,
p_playlist->p_root, false );
p_playlist->p_root );
if( p_item != NULL )
{
playlist_NodeDelete( p_playlist, p_item, false );
......@@ -586,18 +586,15 @@ int playlist_InsertInputItemTree (
* \param p_playlist the playlist object
* \param p_item the input item
* \param p_root root playlist item
* \param b_items_only TRUE if we want the item himself
* \return the first found item, or NULL if not found
*/
playlist_item_t *playlist_ItemFindFromInputAndRoot( playlist_t *p_playlist,
input_item_t *p_item,
playlist_item_t *p_root,
bool b_items_only )
playlist_item_t *p_root )
{
for( int i = 0 ; i< p_root->i_children ; i++ )
{
if( ( b_items_only ? p_root->pp_children[i]->i_children == -1 : 1 ) &&
p_root->pp_children[i]->p_input == p_item )
if( p_root->pp_children[i]->p_input == p_item )
{
return p_root->pp_children[i];
}
......@@ -605,8 +602,7 @@ playlist_item_t *playlist_ItemFindFromInputAndRoot( playlist_t *p_playlist,
{
playlist_item_t *p_search =
playlist_ItemFindFromInputAndRoot( p_playlist, p_item,
p_root->pp_children[i],
b_items_only );
p_root->pp_children[i] );
if( p_search ) return p_search;
}
}
......
......@@ -131,8 +131,7 @@ int playlist_NodeInsert(playlist_t *, playlist_item_t*, playlist_item_t *,
int);
playlist_item_t *playlist_ItemFindFromInputAndRoot( playlist_t *p_playlist,
input_item_t *p_input, playlist_item_t *p_root,
bool );
input_item_t *p_input, playlist_item_t *p_root );
int playlist_DeleteFromItemId( playlist_t*, int );
void playlist_ItemRelease( playlist_item_t * );
......
......@@ -196,8 +196,7 @@ static void playlist_sd_item_removed(services_discovery_t *sd,
PL_LOCK;
playlist_item_t *p_item =
playlist_ItemFindFromInputAndRoot( p_playlist, p_input,
p_sd_node, false );
playlist_ItemFindFromInputAndRoot( p_playlist, p_input, p_sd_node );
if( !p_item )
{
PL_UNLOCK; return;
......
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