diff options
Diffstat (limited to 'src/PlaylistQueue.cxx')
-rw-r--r-- | src/PlaylistQueue.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/PlaylistQueue.cxx b/src/PlaylistQueue.cxx index a8359d427..e65608bf4 100644 --- a/src/PlaylistQueue.cxx +++ b/src/PlaylistQueue.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2013 The Music Player Daemon Project + * Copyright (C) 2003-2014 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -19,13 +19,12 @@ #include "config.h" #include "PlaylistQueue.hxx" -#include "PlaylistPlugin.hxx" #include "PlaylistAny.hxx" #include "PlaylistSong.hxx" #include "Playlist.hxx" #include "InputStream.hxx" #include "SongEnumerator.hxx" -#include "Song.hxx" +#include "DetachedSong.hxx" #include "thread/Cond.hxx" #include "fs/Traits.hxx" @@ -36,16 +35,16 @@ playlist_load_into_queue(const char *uri, SongEnumerator &e, bool secure) { const std::string base_uri = uri != nullptr - ? PathTraits::GetParentUTF8(uri) + ? PathTraitsUTF8::GetParent(uri) : std::string("."); - Song *song; + DetachedSong *song; for (unsigned i = 0; i < end_index && (song = e.NextSong()) != nullptr; ++i) { if (i < start_index) { /* skip songs before the start index */ - song->Free(); + delete song; continue; } @@ -54,8 +53,8 @@ playlist_load_into_queue(const char *uri, SongEnumerator &e, if (song == nullptr) continue; - PlaylistResult result = dest.AppendSong(pc, song); - song->Free(); + PlaylistResult result = dest.AppendSong(pc, std::move(*song)); + delete song; if (result != PlaylistResult::SUCCESS) return result; } |