diff options
author | Max Kellermann <max@duempel.org> | 2014-02-04 19:17:22 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-02-04 19:17:22 +0100 |
commit | bae6f653d107d23b9e59070238cf8d1bed5eb24f (patch) | |
tree | ca450308141246a173568e44690d6506fec305bc | |
parent | eec6d0995982a59960dfb38cddad8bf4567e6b3c (diff) | |
download | mpd-bae6f653d107d23b9e59070238cf8d1bed5eb24f.tar.gz mpd-bae6f653d107d23b9e59070238cf8d1bed5eb24f.tar.xz mpd-bae6f653d107d23b9e59070238cf8d1bed5eb24f.zip |
Instance: merge DatabaseModified() into OnDatabaseModified()
Diffstat (limited to '')
-rw-r--r-- | src/Instance.cxx | 18 | ||||
-rw-r--r-- | src/Instance.hxx | 7 |
2 files changed, 7 insertions, 18 deletions
diff --git a/src/Instance.cxx b/src/Instance.cxx index 42d62ac7c..db81a2542 100644 --- a/src/Instance.cxx +++ b/src/Instance.cxx @@ -40,16 +40,6 @@ Instance::DeleteSong(const char *uri) partition->DeleteSong(uri); } -void -Instance::DatabaseModified() -{ - assert(database != nullptr); - - stats_invalidate(); - partition->DatabaseModified(*database); - idle_add(IDLE_DATABASE); -} - #endif void @@ -69,7 +59,13 @@ Instance::SyncWithPlayer() void Instance::OnDatabaseModified() { - DatabaseModified(); + assert(database != nullptr); + + /* propagate the change to all subsystems */ + + stats_invalidate(); + partition->DatabaseModified(*database); + idle_add(IDLE_DATABASE); } #endif diff --git a/src/Instance.hxx b/src/Instance.hxx index 9e3f92458..7d517e245 100644 --- a/src/Instance.hxx +++ b/src/Instance.hxx @@ -81,13 +81,6 @@ struct Instance final Database *GetDatabase(Error &error); void DeleteSong(const char *uri); - - /** - * The database has been modified. Propagate the change to - * all subsystems. - */ - void DatabaseModified(); - #endif /** |