diff --git a/src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx b/src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx index f1efd6d25..77278f243 100644 --- a/src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx +++ b/src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx @@ -35,6 +35,8 @@ #include "fs/AllocatedPath.hxx" #include "util/ASCII.hxx" +#include + #include class EmbeddedCuePlaylist final : public SongEnumerator { @@ -56,17 +58,9 @@ public: */ char *next; - CueParser *parser; + std::unique_ptr parser; public: - EmbeddedCuePlaylist() noexcept - :parser(nullptr) { - } - - ~EmbeddedCuePlaylist() noexcept override { - delete parser; - } - std::unique_ptr NextSong() override; }; @@ -113,7 +107,7 @@ embcue_playlist_open_uri(const char *uri, playlist->cuesheet = std::move(extract_cuesheet.cuesheet); playlist->next = &playlist->cuesheet[0]; - playlist->parser = new CueParser(); + playlist->parser = std::make_unique(); return playlist; }