From 8b5c33cecdb1e41b08d8141222f6dba50a836889 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 20 Feb 2019 20:48:20 +0100 Subject: Instance: use std::unique_ptr<> to manage the Database pointer --- src/Instance.hxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Instance.hxx') 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(); } /** -- cgit v1.2.3