playlist/Plugin: use std::unique_ptr<SongEnumerator>

This commit is contained in:
Max Kellermann
2018-01-20 19:56:44 +01:00
parent 147f64e1fc
commit 0095e2d7d8
21 changed files with 71 additions and 70 deletions

View File

@@ -187,7 +187,7 @@ xspf_char_data(void *user_data, const XML_Char *s, int len)
*
*/
static SongEnumerator *
static std::unique_ptr<SongEnumerator>
xspf_open_stream(InputStreamPtr &&is)
{
XspfParser parser;
@@ -200,7 +200,7 @@ xspf_open_stream(InputStreamPtr &&is)
}
parser.songs.reverse();
return new MemorySongEnumerator(std::move(parser.songs));
return std::make_unique<MemorySongEnumerator>(std::move(parser.songs));
}
static const char *const xspf_suffixes[] = {