diff options
author | Max Kellermann <max@musicpd.org> | 2019-02-20 20:48:20 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2019-02-20 20:48:20 +0100 |
commit | 8b5c33cecdb1e41b08d8141222f6dba50a836889 (patch) | |
tree | a9c1835c7b187947598ded40ee1e0cc3ec909d7f /src/Instance.hxx | |
parent | 6c28adbcd2e0e9b78d7d68193f435e80548565fe (diff) |
Instance: use std::unique_ptr<> to manage the Database pointer
Diffstat (limited to 'src/Instance.hxx')
-rw-r--r-- | src/Instance.hxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Instance.hxx b/src/Instance.hxx index 23a3c52b9..5aa2209d9 100644 --- a/src/Instance.hxx +++ b/src/Instance.hxx @@ -41,7 +41,7 @@ class NeighborGlue; #ifdef ENABLE_DATABASE #include "db/DatabaseListener.hxx" -class Database; +#include "db/Ptr.hxx" class Storage; class UpdateService; #endif @@ -104,7 +104,7 @@ struct Instance final #endif #ifdef ENABLE_DATABASE - Database *database; + DatabasePtr database; /** * This is really a #CompositeStorage. To avoid heavy include @@ -155,7 +155,7 @@ struct Instance final * music_directory was configured). */ Database *GetDatabase() { - return database; + return database.get(); } /** |