From 79e4ee10e9ebd6382f819502285685ce21e69ef0 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Wed, 6 Jul 2016 18:44:56 +0000 Subject: dbx_lmdb: code optimization git-svn-id: http://svn.miranda-ng.org/main/trunk@17069 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Dbx_mdb/src/init.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/Dbx_mdb/src/init.cpp') diff --git a/plugins/Dbx_mdb/src/init.cpp b/plugins/Dbx_mdb/src/init.cpp index 264ef433f4..18941a73d9 100644 --- a/plugins/Dbx_mdb/src/init.cpp +++ b/plugins/Dbx_mdb/src/init.cpp @@ -49,14 +49,14 @@ LIST g_Dbs(1, HandleKeySortT); // returns 0 if the profile is created, EMKPRF* static int makeDatabase(const TCHAR *profile) { - std::auto_ptr db(new CDbxMdb(profile, 0)); + std::unique_ptr db(new CDbxMdb(profile, 0)); return db->Create(); } // returns 0 if the given profile has a valid header static int grokHeader(const TCHAR *profile) { - std::auto_ptr db(new CDbxMdb(profile, DBMODE_SHARED | DBMODE_READONLY)); + std::unique_ptr db(new CDbxMdb(profile, DBMODE_SHARED | DBMODE_READONLY)); return db->Check(); } @@ -66,7 +66,7 @@ static MIDatabase* LoadDatabase(const TCHAR *profile, BOOL bReadOnly) // set the memory, lists & UTF8 manager mir_getLP(&pluginInfo); - std::auto_ptr db(new CDbxMdb(profile, (bReadOnly) ? DBMODE_READONLY : 0)); + std::unique_ptr db(new CDbxMdb(profile, (bReadOnly) ? DBMODE_READONLY : 0)); if (db->Load(false) != ERROR_SUCCESS) return NULL; @@ -83,7 +83,7 @@ static int UnloadDatabase(MIDatabase *db) MIDatabaseChecker* CheckDb(const TCHAR *profile, int *error) { - std::auto_ptr db(new CDbxMdb(profile, DBMODE_READONLY)); + std::unique_ptr db(new CDbxMdb(profile, DBMODE_READONLY)); if (db->Load(true) != ERROR_SUCCESS) { *error = ERROR_ACCESS_DENIED; return NULL; -- cgit v1.2.3