playlist/cue/CueParser: Get() returns std::unique_ptr

This commit is contained in:
Max Kellermann
2016-02-07 11:58:17 +01:00
parent 5869a4ba2d
commit e2a0fd7a28
4 changed files with 13 additions and 11 deletions
+4 -2
View File
@@ -281,7 +281,7 @@ CueParser::Finish()
end = true;
}
DetachedSong *
std::unique_ptr<DetachedSong>
CueParser::Get()
{
if (finished == nullptr && end) {
@@ -293,5 +293,7 @@ CueParser::Get()
previous.reset();
}
return finished.release();
auto result = std::move(finished);
finished.reset();
return result;
}
+1 -1
View File
@@ -118,7 +118,7 @@ public:
* @return a song object that must be freed by the caller, or NULL if
* no song was finished at this time
*/
DetachedSong *Get();
std::unique_ptr<DetachedSong> Get();
private:
gcc_pure