diff options
author | George Hazan <ghazan@miranda.im> | 2017-08-22 15:23:04 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-08-22 15:23:04 +0300 |
commit | 92fec1aa22df4c4f1213d33663637c00b753f451 (patch) | |
tree | cc80e435a189a5d4766bdffd08f9997e7fff51b9 /plugins/Db3x_mmap/src/dbtool/eventchain.cpp | |
parent | 94dde7112f11c5963aa620c692170d02fe65a2a7 (diff) |
code cleaning
Diffstat (limited to 'plugins/Db3x_mmap/src/dbtool/eventchain.cpp')
-rw-r--r-- | plugins/Db3x_mmap/src/dbtool/eventchain.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/Db3x_mmap/src/dbtool/eventchain.cpp b/plugins/Db3x_mmap/src/dbtool/eventchain.cpp index e03bee1b0d..0225aa685a 100644 --- a/plugins/Db3x_mmap/src/dbtool/eventchain.cpp +++ b/plugins/Db3x_mmap/src/dbtool/eventchain.cpp @@ -33,8 +33,8 @@ static DWORD eventCount; static DWORD lastTimestamp;
static DWORD ofsFirstUnread, tsFirstUnread;
static DWORD memsize = 0;
-static DBEvent* memblock = NULL;
-static DBEvent* dbePrevEvent = NULL;
+static DBEvent* memblock = nullptr;
+static DBEvent* dbePrevEvent = nullptr;
void CDb3Mmap::ConvertOldEvent(DBEvent*& dbei)
{
@@ -56,7 +56,7 @@ void CDb3Mmap::ConvertOldEvent(DBEvent*& dbei) if (msglenW > 0 && msglenW <= msglen) {
char* utf8str = Utf8EncodeW((WCHAR*)&dbei->blob[msglen]);
- if (utf8str == NULL)
+ if (utf8str == nullptr)
return;
dbei->cbBlob = (DWORD)mir_strlen(utf8str) + 1;
@@ -98,7 +98,7 @@ void CDb3Mmap::FinishUp(DWORD ofsLast, DBContact *dbc) if (memsize && memblock) {
free(memblock);
memsize = 0;
- memblock = NULL;
+ memblock = nullptr;
}
}
@@ -123,7 +123,7 @@ DWORD CDb3Mmap::WriteEvent(DBEvent *dbe) DWORD ofs = WriteSegment(WSOFS_END, dbe, offsetof(DBEvent, blob) + dbe->cbBlob);
if (ofs == WS_ERROR) {
free(memblock);
- memblock = NULL;
+ memblock = nullptr;
memsize = 0;
return 0;
}
@@ -135,7 +135,7 @@ int CDb3Mmap::WorkEventChain(DWORD ofsContact, DBContact *dbc, int firstTime) int isUnread = 0;
if (firstTime) {
- dbePrevEvent = NULL;
+ dbePrevEvent = nullptr;
ofsPrevEvent = 0;
ofsDestPrevEvent = 0;
ofsThisEvent = dbc->ofsFirstEvent;
@@ -219,7 +219,7 @@ int CDb3Mmap::WorkEventChain(DWORD ofsContact, DBContact *dbc, int firstTime) return ERROR_SUCCESS;
}
- DBEvent *dbePrev = NULL;
+ DBEvent *dbePrev = nullptr;
if (dbePrevEvent && dbeOld.timestamp == lastTimestamp) {
int len = offsetof(DBEvent, blob) + dbePrevEvent->cbBlob;
dbePrev = (DBEvent*)malloc(len);
|