[vlc-devel] commit: sort: we have a macro so use it and remove unused variable. ( Rémi Duraffort )
git version control
git at videolan.org
Thu Apr 16 23:31:26 CEST 2009
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Apr 16 00:08:20 2009 +0200| [a155e540a334137473431f62606fbdfa37f54d01] | committer: Rémi Duraffort
sort: we have a macro so use it and remove unused variable.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a155e540a334137473431f62606fbdfa37f54d01
---
src/playlist/sort.c | 26 ++++----------------------
1 files changed, 4 insertions(+), 22 deletions(-)
diff --git a/src/playlist/sort.c b/src/playlist/sort.c
index 8b4f152..bc54f72 100644
--- a/src/playlist/sort.c
+++ b/src/playlist/sort.c
@@ -89,8 +89,6 @@ static int playlist_ItemArraySort( playlist_t *p_playlist, int i_items,
{
int i_position;
playlist_item_t *p_temp;
- vlc_value_t val;
- val.b_bool = true;
sort_mode = i_mode;
sort_type = i_type;
@@ -170,9 +168,9 @@ static int playlist_cmp(const void *first, const void *second)
int i_test = 0;
if( sort_mode == SORT_TITLE )
- {
- META_STRCASECMP_NAME( );
- }
+ {
+ META_STRCASECMP_NAME( );
+ }
else if( sort_mode == SORT_TITLE_NUMERIC )
{
char *psz_i = input_item_GetName( (*(playlist_item_t **)first)->p_input );
@@ -235,23 +233,7 @@ static int playlist_cmp(const void *first, const void *second)
}
else
{
- if ( (*(playlist_item_t **)first)->p_input->psz_name != NULL &&
- (*(playlist_item_t **)second)->p_input->psz_name != NULL )
- {
- i_test = strcasecmp( (*(playlist_item_t **)first)->p_input->psz_name,
- (*(playlist_item_t **)second)->p_input->psz_name );
- }
- else if ( (*(playlist_item_t **)first)->p_input->psz_name != NULL &&
- (*(playlist_item_t **)second)->p_input->psz_name == NULL )
- {
- i_test = 1;
- }
- else if ( (*(playlist_item_t **)first)->p_input->psz_name == NULL &&
- (*(playlist_item_t **)second)->p_input->psz_name != NULL )
- {
- i_test = -1;
- }
- else i_test = 0;
+ META_STRCASECMP_NAME();
}
}
else if( sort_mode == SORT_URI )
More information about the vlc-devel
mailing list