From 0d3b1e2959bdf303c9e60bc9d3940e51e5e3e1d1 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sat, 7 May 2016 15:38:25 +0000 Subject: dbx_lmdb: optimization git-svn-id: http://svn.miranda-ng.org/main/trunk@16813 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Dbx_mdb/src/dbintf.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'plugins/Dbx_mdb/src/dbintf.h') diff --git a/plugins/Dbx_mdb/src/dbintf.h b/plugins/Dbx_mdb/src/dbintf.h index cb058d914e..97ec416295 100644 --- a/plugins/Dbx_mdb/src/dbintf.h +++ b/plugins/Dbx_mdb/src/dbintf.h @@ -43,7 +43,7 @@ struct ModuleName #include -#define DBHEADER_VERSION 2 +#define DBHEADER_VERSION 3 #define DBHEADER_SIGNATURE 0x40DECADEu struct DBHeader { @@ -97,7 +97,6 @@ struct DBSettingKey char szSettingName[100]; }; - #include struct DBCachedContact : public DBCachedContactBase @@ -118,8 +117,12 @@ struct EventItem DWORD eventId; }; +class LMDBEventCursor; + struct CDbxMdb : public MIDatabase, public MIDatabaseChecker, public MZeroedObject { + friend class LMDBEventCursor; + CDbxMdb(const TCHAR *tszFileName, int mode); ~CDbxMdb(); @@ -193,7 +196,7 @@ protected: void FillContacts(void); bool Remap(); - bool Map(); + int Map(); protected: TCHAR* m_tszProfileName; @@ -241,8 +244,7 @@ protected: MDB_dbi m_dbEvents, m_dbEventsSort; MDB_cursor *m_curEvents, *m_curEventsSort; - DWORD m_dwMaxEventId, m_tsLast; - MEVENT m_evLast; + DWORD m_dwMaxEventId; void FindNextUnread(const txn_ptr &_txn, DBCachedContact *cc, DBEventSortingKey &key2); @@ -282,4 +284,4 @@ protected: void GenerateNewKey(); void InitDialogs(); -}; +}; \ No newline at end of file -- cgit v1.2.3