diff options
Diffstat (limited to 'src/PlaylistQueue.cxx')
-rw-r--r-- | src/PlaylistQueue.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/PlaylistQueue.cxx b/src/PlaylistQueue.cxx index a8359d427..d2dce977a 100644 --- a/src/PlaylistQueue.cxx +++ b/src/PlaylistQueue.cxx @@ -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; } |