Instance: use std::unique_ptr<> to manage the Database pointer

This commit is contained in:
Max Kellermann
2019-02-20 20:48:20 +01:00
parent 6c28adbcd2
commit 8b5c33cecd
8 changed files with 13 additions and 14 deletions

View File

@@ -106,7 +106,7 @@ storage_state_restore(const char *line, TextFile &file, Instance &instance)
return true;
}
if (auto *db = dynamic_cast<SimpleDatabase *>(instance.database)) {
if (auto *db = dynamic_cast<SimpleDatabase *>(instance.GetDatabase())) {
try {
db->Mount(uri.c_str(), url.c_str());
} catch (...) {