From 2edad38c7ca8310e5524d69e9e9edd119c4dfc67 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 18 Mar 2016 16:18:41 +0100 Subject: db/DatabaseListener: pass URI to OnDatabaseSongRemoved() There's no point in passing a LightSong reference here; the callee is interested only in the URI. --- src/Instance.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/Instance.cxx') 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 -- cgit v1.2.3