From aff0eb47d947692758c57363d1407c6adac316da Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 3 Oct 2009 19:19:05 +0200 Subject: [PATCH] filelist: removed filelist_prepend() This hack isn't used anymore. --- src/filelist.c | 22 ---------------------- src/filelist.h | 3 --- 2 files changed, 25 deletions(-) diff --git a/src/filelist.c b/src/filelist.c index a8b8b3c..063acbb 100644 --- a/src/filelist.c +++ b/src/filelist.c @@ -66,28 +66,6 @@ filelist_append(struct filelist *filelist, struct mpd_entity *entity) return entry; } -struct filelist_entry * -filelist_prepend(struct filelist *filelist, struct mpd_entity *entity) -{ - struct filelist_entry *entry = filelist_append(filelist, entity); - - /* this is very slow, but we should optimize screen_artist.c - later so that this function can be removed, so I'm not in - the mood to implement something better here */ - - if (!filelist_is_empty(filelist)) { - guint i; - - for (i = filelist_length(filelist) - 1; i > 0; --i) - g_ptr_array_index(filelist->entries, i) = - filelist_get(filelist, i - 1); - - g_ptr_array_index(filelist->entries, 0) = entry; - } - - return entry; -} - void filelist_move(struct filelist *filelist, struct filelist *from) { diff --git a/src/filelist.h b/src/filelist.h index a0805d1..bbae9d6 100644 --- a/src/filelist.h +++ b/src/filelist.h @@ -62,9 +62,6 @@ filelist_get(const struct filelist *filelist, guint i) struct filelist_entry * filelist_append(struct filelist *filelist, struct mpd_entity *entity); -struct filelist_entry * -filelist_prepend(struct filelist *filelist, struct mpd_entity *entity); - void filelist_move(struct filelist *filelist, struct filelist *from); -- 2.30.2