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

playlist: remove dead playlist_GetPrevLeaf()

parent 3f81cf7e
......@@ -367,7 +367,6 @@ VLC_API playlist_item_t * playlist_ChildSearchName(playlist_item_t*, const char*
VLC_API void playlist_NodeDelete( playlist_t *, playlist_item_t *, bool , bool );
VLC_API playlist_item_t * playlist_GetNextLeaf( playlist_t *p_playlist, playlist_item_t *p_root, playlist_item_t *p_item, bool b_ena, bool b_unplayed ) VLC_USED;
VLC_API playlist_item_t * playlist_GetPrevLeaf( playlist_t *p_playlist, playlist_item_t *p_root, playlist_item_t *p_item, bool b_ena, bool b_unplayed ) VLC_USED;
/**************************
* Audio output management
......
......@@ -343,7 +343,6 @@ playlist_Deactivate
playlist_DeleteFromInput
playlist_Export
playlist_GetNextLeaf
playlist_GetPrevLeaf
playlist_GetNodeDuration
playlist_Import
playlist_IsServicesDiscoveryLoaded
......
......@@ -307,47 +307,6 @@ playlist_item_t *playlist_GetNextLeaf( playlist_t *p_playlist,
return p_next;
}
/**
* Finds the previous item to play
*
* \param p_playlist the playlist
* \param p_root the root node
* \param p_item the previous item (NULL if none )
* \return the next item to play, or NULL if none found
*/
playlist_item_t *playlist_GetPrevLeaf( playlist_t *p_playlist,
playlist_item_t *p_root,
playlist_item_t *p_item,
bool b_ena, bool b_unplayed )
{
PL_ASSERT_LOCKED;
playlist_item_t *p_prev;
PL_DEBUG2( "finding previous of %s within %s", PLI_NAME( p_item ),
PLI_NAME( p_root ) );
assert( p_root && p_root->i_children != -1 );
/* Now, walk the tree until we find a suitable previous item */
p_prev = p_item;
while( 1 )
{
bool b_ena_ok = true, b_unplayed_ok = true;
p_prev = GetPrevItem( p_playlist, p_root, p_prev );
if( !p_prev || p_prev == p_root )
break;
if( p_prev->i_children == -1 )
{
if( b_ena && p_prev->i_flags & PLAYLIST_DBL_FLAG )
b_ena_ok = false;
if( b_unplayed && p_prev->i_nb_played != 0 )
b_unplayed_ok = false;
if( b_ena_ok && b_unplayed_ok ) break;
}
}
if( p_prev == NULL ) PL_DEBUG2( "at beginning of node" );
return p_prev;
}
/************************************************************************
* Following functions are local
***********************************************************************/
......
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