aboutsummaryrefslogtreecommitdiffstats
path: root/src/Directory.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Directory.cxx')
-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;
}