aboutsummaryrefslogtreecommitdiffstats
path: root/src/Directory.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-02 22:16:52 +0100
committerMax Kellermann <max@duempel.org>2013-01-03 02:25:06 +0100
commit9023ba4a81d597c8694432655833cf23d83c6cde (patch)
tree304c2465ea160297dff17302f36c4cc38687ccb6 /src/Directory.cxx
parent83488848e1091024a0a307b1539c1a85762ee1f1 (diff)
downloadmpd-9023ba4a81d597c8694432655833cf23d83c6cde.tar.gz
mpd-9023ba4a81d597c8694432655833cf23d83c6cde.tar.xz
mpd-9023ba4a81d597c8694432655833cf23d83c6cde.zip
PlaylistVector: use std::list
Diffstat (limited to '')
-rw-r--r--src/Directory.cxx9
1 files changed, 2 insertions, 7 deletions
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;
}