playlist/Plugin: use std::unique_ptr<SongEnumerator>
This commit is contained in:
@@ -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[] = {
|
||||
|
Reference in New Issue
Block a user