db/simple/Directory: RemoveSong() returns SongPtr

This commit is contained in:
Max Kellermann
2019-09-05 21:12:10 +02:00
parent 07f212c98c
commit ee36a48dbb
3 changed files with 7 additions and 6 deletions

View File

@@ -172,7 +172,7 @@ Directory::AddSong(SongPtr song) noexcept
songs.push_back(*song.release());
}
void
SongPtr
Directory::RemoveSong(Song *song) noexcept
{
assert(holding_db_lock());
@@ -180,6 +180,7 @@ Directory::RemoveSong(Song *song) noexcept
assert(&song->parent == this);
songs.erase(songs.iterator_to(*song));
return SongPtr(song);
}
const Song *