playlist/cue/CueParser: Get() returns std::unique_ptr
This commit is contained in:
@@ -48,20 +48,20 @@ cue_playlist_open_stream(InputStream &is)
|
||||
DetachedSong *
|
||||
CuePlaylist::NextSong()
|
||||
{
|
||||
DetachedSong *song = parser.Get();
|
||||
auto song = parser.Get();
|
||||
if (song != nullptr)
|
||||
return song;
|
||||
return song.release();
|
||||
|
||||
const char *line;
|
||||
while ((line = tis.ReadLine()) != nullptr) {
|
||||
parser.Feed(line);
|
||||
song = parser.Get();
|
||||
if (song != nullptr)
|
||||
return song;
|
||||
return song.release();
|
||||
}
|
||||
|
||||
parser.Finish();
|
||||
return parser.Get();
|
||||
return parser.Get().release();
|
||||
}
|
||||
|
||||
static const char *const cue_playlist_suffixes[] = {
|
||||
|
||||
@@ -127,10 +127,10 @@ embcue_playlist_open_uri(const char *uri,
|
||||
DetachedSong *
|
||||
EmbeddedCuePlaylist::NextSong()
|
||||
{
|
||||
DetachedSong *song = parser->Get();
|
||||
auto song = parser->Get();
|
||||
if (song != nullptr) {
|
||||
song->SetURI(filename);
|
||||
return song;
|
||||
return song.release();
|
||||
}
|
||||
|
||||
while (*next != 0) {
|
||||
@@ -149,7 +149,7 @@ EmbeddedCuePlaylist::NextSong()
|
||||
song = parser->Get();
|
||||
if (song != nullptr) {
|
||||
song->SetURI(filename);
|
||||
return song;
|
||||
return song.release();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ EmbeddedCuePlaylist::NextSong()
|
||||
song = parser->Get();
|
||||
if (song != nullptr)
|
||||
song->SetURI(filename);
|
||||
return song;
|
||||
return song.release();
|
||||
}
|
||||
|
||||
static const char *const embcue_playlist_suffixes[] = {
|
||||
|
||||
Reference in New Issue
Block a user