From 9023ba4a81d597c8694432655833cf23d83c6cde Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 2 Jan 2013 22:16:52 +0100 Subject: PlaylistVector: use std::list --- src/Directory.cxx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/Directory.cxx') diff --git a/src/Directory.cxx b/src/Directory.cxx index dec772c01..f27b3d474 100644 --- a/src/Directory.cxx +++ b/src/Directory.cxx @@ -55,7 +55,6 @@ Directory::Directory() { INIT_LIST_HEAD(&children); INIT_LIST_HEAD(&songs); - INIT_LIST_HEAD(&playlists); path[0] = 0; } @@ -64,15 +63,12 @@ Directory::Directory(const char *_path) { INIT_LIST_HEAD(&children); INIT_LIST_HEAD(&songs); - INIT_LIST_HEAD(&playlists); strcpy(path, _path); } Directory::~Directory() { - playlist_vector_deinit(&playlists); - struct song *song, *ns; directory_for_each_song_safe(song, ns, this) song_free(song); @@ -318,9 +314,8 @@ Directory::Walk(bool recursive, const SongFilter *filter, } if (visit_playlist) { - PlaylistInfo *i; - directory_for_each_playlist(i, this) - if (!visit_playlist(*i, *this, error_r)) + for (const PlaylistInfo &p : playlists) + if (!visit_playlist(p, *this, error_r)) return false; } -- cgit v1.2.3