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

playlist: inline playlist_NodeEmpty()

parent 9afd42ce
...@@ -352,8 +352,13 @@ int playlist_DeleteFromInput( playlist_t *p_playlist, input_item_t *p_input, ...@@ -352,8 +352,13 @@ int playlist_DeleteFromInput( playlist_t *p_playlist, input_item_t *p_input,
*/ */
void playlist_Clear( playlist_t * p_playlist, bool b_locked ) void playlist_Clear( playlist_t * p_playlist, bool b_locked )
{ {
playlist_item_t *p_root = p_playlist->p_playing;
PL_LOCK_IF( !b_locked ); PL_LOCK_IF( !b_locked );
playlist_NodeEmpty( p_playlist, p_playlist->p_playing );
for( int i = p_root->i_children - 1; i >= 0 ;i-- )
playlist_NodeDelete( p_playlist, p_root->pp_children[i], false );
PL_UNLOCK_IF( !b_locked ); PL_UNLOCK_IF( !b_locked );
} }
......
...@@ -134,8 +134,6 @@ playlist_item_t *playlist_ItemFindFromInputAndRoot( playlist_t *p_playlist, ...@@ -134,8 +134,6 @@ playlist_item_t *playlist_ItemFindFromInputAndRoot( playlist_t *p_playlist,
void playlist_ItemRelease( playlist_item_t * ); void playlist_ItemRelease( playlist_item_t * );
void playlist_NodeEmpty( playlist_t *, playlist_item_t * );
void ResetCurrentlyPlaying( playlist_t *p_playlist, playlist_item_t *p_cur ); void ResetCurrentlyPlaying( playlist_t *p_playlist, playlist_item_t *p_cur );
void ResyncCurrentIndex( playlist_t *p_playlist, playlist_item_t *p_cur ); void ResyncCurrentIndex( playlist_t *p_playlist, playlist_item_t *p_cur );
......
...@@ -86,26 +86,6 @@ playlist_item_t * playlist_NodeCreate( playlist_t *p_playlist, ...@@ -86,26 +86,6 @@ playlist_item_t * playlist_NodeCreate( playlist_t *p_playlist,
return p_item; return p_item;
} }
/**
* Remove all the children of a node
*
* This function must be entered with the playlist lock
*
* \param p_playlist the playlist
* \param p_root the node
*/
void playlist_NodeEmpty( playlist_t *p_playlist, playlist_item_t *p_root )
{
PL_ASSERT_LOCKED;
if( p_root->i_children == -1 )
return;
/* Delete the children */
for( int i = p_root->i_children-1 ; i >= 0 ;i-- )
playlist_NodeDelete( p_playlist, p_root->pp_children[i], false );
}
/** /**
* Remove all the children of a node and removes the node * Remove all the children of a node and removes the node
* *
......
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