summaryrefslogtreecommitdiff
path: root/plugins/Import/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-21 18:06:27 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-21 18:09:19 +0300
commitf7001757a832e948645713a94739f66b07d5f2c1 (patch)
tree8accc928f2eadf5940a336f9be639b3f27e921a6 /plugins/Import/src
parent6119b7865f7890d9bfc627d35d8e1262c2690e9c (diff)
DATABASELINK::Unload method replaced with the virtual destructor of MDatabaseCommon
Diffstat (limited to 'plugins/Import/src')
-rw-r--r--plugins/Import/src/dbrw/dbrw.cpp11
-rw-r--r--plugins/Import/src/import.cpp5
2 files changed, 5 insertions, 11 deletions
diff --git a/plugins/Import/src/dbrw/dbrw.cpp b/plugins/Import/src/dbrw/dbrw.cpp
index 728fafe9ff..b5ed672bdb 100644
--- a/plugins/Import/src/dbrw/dbrw.cpp
+++ b/plugins/Import/src/dbrw/dbrw.cpp
@@ -77,19 +77,13 @@ static int dbrw_grokHeader(const wchar_t *profile)
return rc;
}
-static MIDatabase* dbrw_Load(const wchar_t *profile, BOOL)
+static MDatabaseCommon* dbrw_Load(const wchar_t *profile, BOOL)
{
CDbxSQLite *db = new CDbxSQLite();
db->Open(profile);
return db;
}
-static int dbrw_Unload(MIDatabase *db)
-{
- delete (CDbxSQLite*)db;
- return 0;
-}
-
static DATABASELINK dblink =
{
sizeof(DATABASELINK),
@@ -97,8 +91,7 @@ static DATABASELINK dblink =
L"dbx SQLite driver",
dbrw_makeDatabase,
dbrw_grokHeader,
- dbrw_Load,
- dbrw_Unload
+ dbrw_Load
};
void RegisterDbrw()
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp
index 7a133ae62b..76ff58be8e 100644
--- a/plugins/Import/src/import.cpp
+++ b/plugins/Import/src/import.cpp
@@ -68,7 +68,8 @@ static LIST<DBCachedContact> arMetas(10);
static HWND hdlgProgress;
static DWORD nDupes, nContactsCount, nMessagesCount, nGroupsCount, nSkippedEvents, nSkippedContacts;
-static MIDatabase *srcDb, *dstDb;
+static MDatabaseCommon *srcDb;
+static MIDatabase *dstDb;
/////////////////////////////////////////////////////////////////////////////////////////
@@ -1090,7 +1091,7 @@ void MirandaImport(HWND hdlg)
dstDb->SetCacheSafetyMode(TRUE);
// Clean up before exit
- dblink->Unload(srcDb);
+ delete srcDb;
// Stop timer
dwTimer = time(nullptr) - dwTimer;