From: Max Kellermann Date: Sat, 3 Oct 2009 17:19:05 +0000 (+0200) Subject: filelist: removed filelist_prepend() X-Git-Tag: release-0.16~194 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=aff0eb47d947692758c57363d1407c6adac316da;p=ncmpc.git filelist: removed filelist_prepend() This hack isn't used anymore. --- 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);