summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdb/src/stdafx.h
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/stdafx.h
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/stdafx.h')
-rw-r--r--plugins/Dbx_mdb/src/stdafx.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins/Dbx_mdb/src/stdafx.h b/plugins/Dbx_mdb/src/stdafx.h
index 5360475a0c..128d323350 100644
--- a/plugins/Dbx_mdb/src/stdafx.h
+++ b/plugins/Dbx_mdb/src/stdafx.h
@@ -52,10 +52,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
class txn_ptr
{
- MDB_env *m_env;
MDB_txn *m_txn;
public:
- __forceinline txn_ptr(MDB_env *pEnv) : m_env(pEnv)
+ __forceinline txn_ptr(MDB_env *pEnv)
{
mdb_txn_begin(pEnv, NULL, 0, &m_txn);
}
@@ -82,13 +81,13 @@ public:
}
};
-struct TXN_RO
+struct CMDB_txn_ro
{
MDB_txn *m_txn;
bool bIsActive;
mir_cs cs;
- __forceinline TXN_RO() : m_txn(nullptr), bIsActive(false) {}
+ __forceinline CMDB_txn_ro() : m_txn(nullptr), bIsActive(false) {}
__forceinline operator MDB_txn* () { return m_txn; }
__forceinline MDB_txn** operator &() { return &m_txn; }
@@ -96,11 +95,11 @@ struct TXN_RO
class txn_ptr_ro
{
- TXN_RO &m_txn;
+ CMDB_txn_ro &m_txn;
bool bNeedReset;
mir_cslock lock;
public:
- __forceinline txn_ptr_ro(TXN_RO &txn) : m_txn(txn), bNeedReset(!txn.bIsActive), lock(m_txn.cs)
+ __forceinline txn_ptr_ro(CMDB_txn_ro &txn) : m_txn(txn), bNeedReset(!txn.bIsActive), lock(m_txn.cs)
{
if (bNeedReset)
{