[vlc-devel] commit: Remove unused function. ( Rémi Duraffort )

git version control git at videolan.org
Fri Jul 10 14:32:09 CEST 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Jul 10 13:56:30 2009 +0200| [385750a56cfdc2aa2f3d23ee06f657eaeb22cdb5] | committer: Rémi Duraffort 

Remove unused function.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=385750a56cfdc2aa2f3d23ee06f657eaeb22cdb5
---

 include/vlc_playlist.h |    1 -
 src/libvlccore.sym     |    1 -
 src/playlist/tree.c    |   28 ++--------------------------
 3 files changed, 2 insertions(+), 28 deletions(-)

diff --git a/include/vlc_playlist.h b/include/vlc_playlist.h
index 098b3f2..b98e13c 100644
--- a/include/vlc_playlist.h
+++ b/include/vlc_playlist.h
@@ -364,7 +364,6 @@ VLC_EXPORT( int, playlist_NodeDelete, ( playlist_t *, playlist_item_t *, bool ,
 VLC_EXPORT( playlist_item_t *, playlist_GetPreferredNode, ( playlist_t *p_playlist, playlist_item_t *p_node ) );
 VLC_EXPORT( 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_EXPORT( 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_EXPORT( playlist_item_t *, playlist_GetLastLeaf, ( playlist_t *p_playlist, playlist_item_t *p_root ) );
 
 /***********************************************************************
  * Inline functions
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 64aabea..357f4ec 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -315,7 +315,6 @@ playlist_CurrentInput
 playlist_CurrentPlayingItem
 playlist_DeleteFromInput
 playlist_Export
-playlist_GetLastLeaf
 playlist_GetNextLeaf
 playlist_GetPreferredNode
 playlist_GetPrevLeaf
diff --git a/src/playlist/tree.c b/src/playlist/tree.c
index 32ef051..9937d0d 100644
--- a/src/playlist/tree.c
+++ b/src/playlist/tree.c
@@ -144,7 +144,7 @@ int playlist_NodeDelete( playlist_t *p_playlist, playlist_item_t *p_root,
     }
 
     /* Delete the children */
-    for( i =  p_root->i_children - 1 ; i >= 0; i-- )
+    for( i = p_root->i_children - 1 ; i >= 0; i-- )
     {
         if( p_root->pp_children[i]->i_children > -1 )
         {
@@ -333,30 +333,6 @@ playlist_item_t * playlist_GetPreferredNode( playlist_t *p_playlist,
 /**********************************************************************
  * Tree walking functions
  **********************************************************************/
-
-playlist_item_t *playlist_GetLastLeaf(playlist_t *p_playlist,
-                                      playlist_item_t *p_root )
-{
-    PL_ASSERT_LOCKED;
-    int i;
-    playlist_item_t *p_item;
-    for ( i = p_root->i_children - 1; i >= 0; i-- )
-    {
-        if( p_root->pp_children[i]->i_children == -1 )
-            return p_root->pp_children[i];
-        else if( p_root->pp_children[i]->i_children > 0)
-        {
-             p_item = playlist_GetLastLeaf( p_playlist,
-                                            p_root->pp_children[i] );
-            if ( p_item != NULL )
-                return p_item;
-        }
-        else if( i == 0 )
-            return NULL;
-    }
-    return NULL;
-}
-
 /**
  * Finds the next item to play
  *
@@ -415,7 +391,7 @@ playlist_item_t *playlist_GetPrevLeaf( playlist_t *p_playlist,
     PL_ASSERT_LOCKED;
     playlist_item_t *p_prev;
 
-    PL_DEBUG2( "finding previous os %s within %s", PLI_NAME( p_item ),
+    PL_DEBUG2( "finding previous of %s within %s", PLI_NAME( p_item ),
                                                    PLI_NAME( p_root ) );
     assert( p_root && p_root->i_children != -1 );
 




More information about the vlc-devel mailing list