db/Interface: remove IsPlugin(), use dynamic_cast
instead
This commit is contained in:
@@ -106,10 +106,9 @@ storage_state_restore(const char *line, TextFile &file, Instance &instance)
|
||||
return true;
|
||||
}
|
||||
|
||||
Database *db = instance.database;
|
||||
if (db != nullptr && db->IsPlugin(simple_db_plugin)) {
|
||||
if (auto *db = dynamic_cast<SimpleDatabase *>(instance.database)) {
|
||||
try {
|
||||
((SimpleDatabase *)db)->Mount(uri.c_str(), url.c_str());
|
||||
db->Mount(uri.c_str(), url.c_str());
|
||||
} catch (...) {
|
||||
FormatError(std::current_exception(),
|
||||
"Failed to restore mount to %s",
|
||||
|
Reference in New Issue
Block a user