player/Control: wrap DetachedSong* in std::unique_ptr

This commit is contained in:
Max Kellermann
2017-11-26 11:46:14 +01:00
parent b652ad9568
commit b13b023c6b
6 changed files with 59 additions and 61 deletions

View File

@@ -88,11 +88,9 @@ Partition::DatabaseModified(const Database &db)
void
Partition::TagModified()
{
DetachedSong *song = pc.LockReadTaggedSong();
if (song != nullptr) {
auto song = pc.LockReadTaggedSong();
if (song)
playlist.TagModified(std::move(*song));
delete song;
}
}
void