[vlc-commits] playlist: inline playlist_DeleteFromItemId()
Rémi Denis-Courmont
git at videolan.org
Wed Nov 16 23:05:06 CET 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Nov 16 22:16:33 2016 +0200| [9afd42ce8d8474970fe800aeb746f7c488f48aa8] | committer: Rémi Denis-Courmont
playlist: inline playlist_DeleteFromItemId()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9afd42ce8d8474970fe800aeb746f7c488f48aa8
---
src/playlist/item.c | 18 ------------------
src/playlist/playlist_internal.h | 1 -
src/playlist/tree.c | 13 +------------
3 files changed, 1 insertion(+), 31 deletions(-)
diff --git a/src/playlist/item.c b/src/playlist/item.c
index de7c5a5..ba49d6f 100644
--- a/src/playlist/item.c
+++ b/src/playlist/item.c
@@ -357,24 +357,6 @@ void playlist_Clear( playlist_t * p_playlist, bool b_locked )
PL_UNLOCK_IF( !b_locked );
}
-/**
- * Delete playlist item
- *
- * Remove a playlist item from the playlist, given its id
- * This function is to be used only by the playlist
- * \param p_playlist playlist object
- * \param i_id id of the item do delete
- * \return VLC_SUCCESS or an error
- */
-int playlist_DeleteFromItemId( playlist_t *p_playlist, int i_id )
-{
- PL_ASSERT_LOCKED;
- playlist_item_t *p_item = playlist_ItemGetById( p_playlist, i_id );
- if( !p_item ) return VLC_EGENERIC;
- playlist_NodeDelete( p_playlist, p_item, false );
- return VLC_SUCCESS;
-}
-
/***************************************************************************
* Playlist item addition
***************************************************************************/
diff --git a/src/playlist/playlist_internal.h b/src/playlist/playlist_internal.h
index 332259f..04a4f3c 100644
--- a/src/playlist/playlist_internal.h
+++ b/src/playlist/playlist_internal.h
@@ -132,7 +132,6 @@ int playlist_NodeInsert(playlist_t *, playlist_item_t*, playlist_item_t *,
playlist_item_t *playlist_ItemFindFromInputAndRoot( playlist_t *p_playlist,
input_item_t *p_input, playlist_item_t *p_root );
-int playlist_DeleteFromItemId( playlist_t*, int );
void playlist_ItemRelease( playlist_item_t * );
void playlist_NodeEmpty( playlist_t *, playlist_item_t * );
diff --git a/src/playlist/tree.c b/src/playlist/tree.c
index b1e2232..88e99bb 100644
--- a/src/playlist/tree.c
+++ b/src/playlist/tree.c
@@ -103,18 +103,7 @@ void playlist_NodeEmpty( playlist_t *p_playlist, playlist_item_t *p_root )
/* Delete the children */
for( int i = p_root->i_children-1 ; i >= 0 ;i-- )
- {
- if( p_root->pp_children[i]->i_children > -1 )
- {
- playlist_NodeDelete( p_playlist, p_root->pp_children[i], false );
- }
- else
- {
- /* Delete the item here */
- playlist_DeleteFromItemId( p_playlist,
- p_root->pp_children[i]->i_id );
- }
- }
+ playlist_NodeDelete( p_playlist, p_root->pp_children[i], false );
}
/**
More information about the vlc-commits
mailing list