From bb106c3bf8daf366a4b4ca7229010c038f89755c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 12 Oct 2008 03:35:45 -0700 Subject: directory: always maintain sorted properties vectors This allows clients to see sorted results while we're updating the DB and removes the need for us to have to sort manually. We'll have to write separate routines for managing stored playlists with songvecs eventually; but that's for another day. --- src/directory.c | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/directory.c') diff --git a/src/directory.c b/src/directory.c index 709353476..3ebac6830 100644 --- a/src/directory.c +++ b/src/directory.c @@ -110,19 +110,6 @@ directory_get_subdir(struct directory *dir, const char *name) return found; } -static int directory_sort_x(struct directory *dir, mpd_unused void *arg) -{ - directory_sort(dir); - return 0; -} - -void directory_sort(struct directory *dir) -{ - dirvec_sort(&dir->children); - dirvec_for_each(&dir->children, directory_sort_x, NULL); - songvec_sort(&dir->songs); -} - struct dirwalk_arg { int (*each_song) (struct mpd_song *, void *); int (*each_dir) (struct directory *, void *); -- cgit v1.2.3