diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2016-05-07 15:38:25 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2016-05-07 15:38:25 +0000 |
commit | 0d3b1e2959bdf303c9e60bc9d3940e51e5e3e1d1 (patch) | |
tree | 0c3b11fc01cef6dedaf925692ceba0847e6d1cd8 /plugins/Dbx_mdb/src/stdafx.h | |
parent | 9cd2417aa9352b4f41cd3abf2ff54b6457b053fb (diff) |
dbx_lmdb: optimization
git-svn-id: http://svn.miranda-ng.org/main/trunk@16813 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_mdb/src/stdafx.h')
-rw-r--r-- | plugins/Dbx_mdb/src/stdafx.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/Dbx_mdb/src/stdafx.h b/plugins/Dbx_mdb/src/stdafx.h index 4de6e9fd39..ebb0c8cc7f 100644 --- a/plugins/Dbx_mdb/src/stdafx.h +++ b/plugins/Dbx_mdb/src/stdafx.h @@ -43,6 +43,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "lmdb\lmdb.h"
+#ifndef thread_local
+# define thread_local __declspec(thread)
+#endif
+
+
class txn_ptr
{
MDB_txn *m_txn;
@@ -79,7 +84,7 @@ class txn_ptr_ro {
MDB_txn *m_txn;
public:
- __forceinline txn_ptr_ro(MDB_txn *&txn) : m_txn(txn)
+ __forceinline txn_ptr_ro(MDB_txn *txn) : m_txn(txn)
{
mdb_txn_renew(m_txn);
}
@@ -114,7 +119,7 @@ class cursor_ptr_ro {
MDB_cursor *m_cursor;
public:
- __forceinline cursor_ptr_ro(MDB_cursor *&cursor) : m_cursor(cursor)
+ __forceinline cursor_ptr_ro(MDB_cursor *cursor) : m_cursor(cursor)
{
mdb_cursor_renew(mdb_cursor_txn(m_cursor), m_cursor); //--
}
|