diff options
author | Max Kellermann <max@duempel.org> | 2016-03-18 16:18:41 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2016-03-18 16:22:33 +0100 |
commit | 2edad38c7ca8310e5524d69e9e9edd119c4dfc67 (patch) | |
tree | b71713c313b97817feee1a0d765693ee6a825526 /src/Instance.cxx | |
parent | 296ee4961ee201d5dbb4180935b93f1c8c586438 (diff) |
db/DatabaseListener: pass URI to OnDatabaseSongRemoved()
There's no point in passing a LightSong reference here; the callee is
interested only in the URI.
Diffstat (limited to 'src/Instance.cxx')
-rw-r--r-- | src/Instance.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Instance.cxx b/src/Instance.cxx index 3559ca528..cfe19fbb8 100644 --- a/src/Instance.cxx +++ b/src/Instance.cxx @@ -26,7 +26,6 @@ #ifdef ENABLE_DATABASE #include "db/DatabaseError.hxx" -#include "db/LightSong.hxx" #ifdef ENABLE_SQLITE #include "sticker/StickerDatabase.hxx" @@ -57,18 +56,17 @@ Instance::OnDatabaseModified() } void -Instance::OnDatabaseSongRemoved(const LightSong &song) +Instance::OnDatabaseSongRemoved(const char *uri) { assert(database != nullptr); #ifdef ENABLE_SQLITE /* if the song has a sticker, remove it */ if (sticker_enabled()) - sticker_song_delete(song, IgnoreError()); + sticker_song_delete(uri, IgnoreError()); #endif - const auto uri = song.GetURI(); - partition->DeleteSong(uri.c_str()); + partition->DeleteSong(uri); } #endif |