summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdb/src/init.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2016-07-06 18:44:56 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2016-07-06 18:44:56 +0000
commit79e4ee10e9ebd6382f819502285685ce21e69ef0 (patch)
tree75d9a769d796bd03d624a43c130e4830a0a9a3fd /plugins/Dbx_mdb/src/init.cpp
parenta113c5dfbcb862c2cf0a49f3f3e873d7325c0c53 (diff)
dbx_lmdb: code optimization
git-svn-id: http://svn.miranda-ng.org/main/trunk@17069 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_mdb/src/init.cpp')
-rw-r--r--plugins/Dbx_mdb/src/init.cpp8
1 files changed, 4 insertions, 4 deletions
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<CDbxMdb> g_Dbs(1, HandleKeySortT);
// returns 0 if the profile is created, EMKPRF*
static int makeDatabase(const TCHAR *profile)
{
- std::auto_ptr<CDbxMdb> db(new CDbxMdb(profile, 0));
+ std::unique_ptr<CDbxMdb> 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<CDbxMdb> db(new CDbxMdb(profile, DBMODE_SHARED | DBMODE_READONLY));
+ std::unique_ptr<CDbxMdb> 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<CDbxMdb> db(new CDbxMdb(profile, (bReadOnly) ? DBMODE_READONLY : 0));
+ std::unique_ptr<CDbxMdb> 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<CDbxMdb> db(new CDbxMdb(profile, DBMODE_READONLY));
+ std::unique_ptr<CDbxMdb> db(new CDbxMdb(profile, DBMODE_READONLY));
if (db->Load(true) != ERROR_SUCCESS) {
*error = ERROR_ACCESS_DENIED;
return NULL;