diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2016-02-14 15:48:21 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2016-02-14 15:48:21 +0000 |
commit | 7f9dacb21b81a04549df028b1493802b7da069fd (patch) | |
tree | df1b0477b1e34cf5b9c84e37a97a1c55699b861b /plugins/Dbx_mdb/src/dbevents.cpp | |
parent | d49312735885a76fac1ff9380a1609883cd6b764 (diff) |
dbx_lmdb: common project, small speed optimization
git-svn-id: http://svn.miranda-ng.org/main/trunk@16278 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_mdb/src/dbevents.cpp')
-rw-r--r-- | plugins/Dbx_mdb/src/dbevents.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/plugins/Dbx_mdb/src/dbevents.cpp b/plugins/Dbx_mdb/src/dbevents.cpp index 16a518ff33..dd9a75e12f 100644 --- a/plugins/Dbx_mdb/src/dbevents.cpp +++ b/plugins/Dbx_mdb/src/dbevents.cpp @@ -21,7 +21,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "commonheaders.h"
+#include "stdafx.h"
STDMETHODIMP_(LONG) CDbxMdb::GetEventCount(MCONTACT contactID)
{
@@ -38,11 +38,7 @@ STDMETHODIMP_(MEVENT) CDbxMdb::AddEvent(MCONTACT contactID, DBEVENTINFO *dbei) dbe.dwSignature = DBEVENT_SIGNATURE;
dbe.contactID = contactID; // store native or subcontact's id
dbe.ofsModuleName = GetModuleNameOfs(dbei->szModule);
- dbe.timestamp = dbei->timestamp;
- dbe.flags = dbei->flags;
- dbe.wEventType = dbei->eventType;
- dbe.cbBlob = dbei->cbBlob;
- BYTE *pBlob = dbei->pBlob;
+
MCONTACT contactNotifyID = contactID;
DBCachedContact *cc, *ccSub = NULL;
@@ -66,6 +62,12 @@ STDMETHODIMP_(MEVENT) CDbxMdb::AddEvent(MCONTACT contactID, DBEVENTINFO *dbei) if (NotifyEventHooks(hEventFilterAddedEvent, contactNotifyID, (LPARAM)dbei))
return NULL;
+ dbe.timestamp = dbei->timestamp;
+ dbe.flags = dbei->flags;
+ dbe.wEventType = dbei->eventType;
+ dbe.cbBlob = dbei->cbBlob;
+ BYTE *pBlob = dbei->pBlob;
+
mir_ptr<BYTE> pCryptBlob;
if (m_bEncrypted) {
size_t len;
|