summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdb/src/dbevents.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2016-03-08 10:39:59 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2016-03-08 10:39:59 +0000
commit0bac8935f42efa1e1152fd09a04d95b76d8c5eb3 (patch)
tree93a8f9fc987ea7007b277ea27d0780999c2e8eeb /plugins/Dbx_mdb/src/dbevents.cpp
parent90cc15799fe189134d9580c1dc121d0b78df17ba (diff)
dbx_lmdb: more fixes & optimizations
git-svn-id: http://svn.miranda-ng.org/main/trunk@16446 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_mdb/src/dbevents.cpp')
-rw-r--r--plugins/Dbx_mdb/src/dbevents.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/Dbx_mdb/src/dbevents.cpp b/plugins/Dbx_mdb/src/dbevents.cpp
index a69b57a5bf..466cd3b452 100644
--- a/plugins/Dbx_mdb/src/dbevents.cpp
+++ b/plugins/Dbx_mdb/src/dbevents.cpp
@@ -215,7 +215,7 @@ STDMETHODIMP_(LONG) CDbxMdb::GetBlobSize(MEVENT hDbEvent)
if (mdb_get(txn, m_dbEvents, &key, &data) != MDB_SUCCESS)
return -1;
- DBEvent *dbe = (DBEvent*)data.mv_data;
+ const DBEvent *dbe = (const DBEvent*)data.mv_data;
return (dbe->dwSignature == DBEVENT_SIGNATURE) ? dbe->cbBlob : 0;
}
@@ -347,7 +347,7 @@ STDMETHODIMP_(MCONTACT) CDbxMdb::GetEventContact(MEVENT hDbEvent)
if (mdb_get(txn, m_dbEvents, &key, &data) != MDB_SUCCESS)
return INVALID_CONTACT_ID;
- DBEvent *dbe = (DBEvent*)data.mv_data;
+ const DBEvent *dbe = (const DBEvent*)data.mv_data;
return (dbe->dwSignature == DBEVENT_SIGNATURE) ? dbe->contactID : INVALID_CONTACT_ID;
}
@@ -362,7 +362,7 @@ STDMETHODIMP_(MEVENT) CDbxMdb::FindFirstEvent(MCONTACT contactID)
cursor_ptr_ro cursor(m_curEventsSort);
mdb_cursor_get(cursor, &key, &data, MDB_SET_RANGE);
- DBEventSortingKey *pKey = (DBEventSortingKey*)key.mv_data;
+ const DBEventSortingKey *pKey = (const DBEventSortingKey*)key.mv_data;
m_tsLast = pKey->ts;
return m_evLast = (pKey->dwContactId == contactID) ? pKey->dwEventId : 0;
}
@@ -386,7 +386,7 @@ STDMETHODIMP_(MEVENT) CDbxMdb::FindLastEvent(MCONTACT contactID)
if (mdb_cursor_get(cursor, &key, &data, MDB_PREV) != MDB_SUCCESS)
return m_evLast = 0;
- DBEventSortingKey *pKey = (DBEventSortingKey*)key.mv_data;
+ const DBEventSortingKey *pKey = (const DBEventSortingKey*)key.mv_data;
m_tsLast = pKey->ts;
return m_evLast = (pKey->dwContactId == contactID) ? pKey->dwEventId : 0;
}
@@ -420,7 +420,7 @@ STDMETHODIMP_(MEVENT) CDbxMdb::FindNextEvent(MCONTACT contactID, MEVENT hDbEvent
if (mdb_cursor_get(cursor, &key, &data, MDB_NEXT) != MDB_SUCCESS)
return m_evLast = 0;
- DBEventSortingKey *pKey = (DBEventSortingKey*)key.mv_data;
+ const DBEventSortingKey *pKey = (const DBEventSortingKey*)key.mv_data;
m_tsLast = pKey->ts;
return m_evLast = (pKey->dwContactId == contactID) ? pKey->dwEventId : 0;
}
@@ -454,7 +454,7 @@ STDMETHODIMP_(MEVENT) CDbxMdb::FindPrevEvent(MCONTACT contactID, MEVENT hDbEvent
if (mdb_cursor_get(cursor, &key, &data, MDB_PREV) != MDB_SUCCESS)
return m_evLast = 0;
- DBEventSortingKey *pKey = (DBEventSortingKey*)key.mv_data;
+ const DBEventSortingKey *pKey = (const DBEventSortingKey*)key.mv_data;
m_tsLast = pKey->ts;
return m_evLast = (pKey->dwContactId == contactID) ? pKey->dwEventId : 0;
}