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/dbmodulechain.cpp | |
parent | 94dde7112f11c5963aa620c692170d02fe65a2a7 (diff) |
code cleaning
Diffstat (limited to 'plugins/Db3x_mmap/src/dbmodulechain.cpp')
-rw-r--r-- | plugins/Db3x_mmap/src/dbmodulechain.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/Db3x_mmap/src/dbmodulechain.cpp b/plugins/Db3x_mmap/src/dbmodulechain.cpp index 983b5a27f7..47d1cf40d3 100644 --- a/plugins/Db3x_mmap/src/dbmodulechain.cpp +++ b/plugins/Db3x_mmap/src/dbmodulechain.cpp @@ -41,21 +41,21 @@ void CDb3Mmap::AddToList(char *name, DWORD ofs) int CDb3Mmap::InitModuleNames(void)
{
DWORD ofsThis = m_dbHeader.ofsModuleNames;
- DBModuleName *dbmn = (struct DBModuleName*)DBRead(ofsThis, NULL);
+ DBModuleName *dbmn = (struct DBModuleName*)DBRead(ofsThis, nullptr);
while (ofsThis) {
if (dbmn->signature != DBMODULENAME_SIGNATURE)
- DatabaseCorruption(NULL);
+ DatabaseCorruption(nullptr);
int nameLen = dbmn->cbName;
char *mod = (char*)HeapAlloc(m_hModHeap, 0, nameLen + 1);
- memcpy(mod, DBRead(ofsThis + offsetof(struct DBModuleName, name), NULL), nameLen);
+ memcpy(mod, DBRead(ofsThis + offsetof(struct DBModuleName, name), nullptr), nameLen);
mod[nameLen] = 0;
AddToList(mod, ofsThis);
ofsThis = dbmn->ofsNext;
- dbmn = (struct DBModuleName*)DBRead(ofsThis, NULL);
+ dbmn = (struct DBModuleName*)DBRead(ofsThis, nullptr);
}
return 0;
}
@@ -115,7 +115,7 @@ char* CDb3Mmap::GetModuleNameByOfs(DWORD ofs) if (m_lastmn && m_lastmn->ofs == ofs)
return m_lastmn->name;
- ModuleName mn = { NULL, ofs };
+ ModuleName mn = { nullptr, ofs };
int index = m_lOfs.getIndex(&mn);
if (index != -1) {
ModuleName *pmn = m_lOfs[index];
@@ -123,8 +123,8 @@ char* CDb3Mmap::GetModuleNameByOfs(DWORD ofs) return pmn->name;
}
- DatabaseCorruption(NULL);
- return NULL;
+ DatabaseCorruption(nullptr);
+ return nullptr;
}
STDMETHODIMP_(BOOL) CDb3Mmap::EnumModuleNames(DBMODULEENUMPROC pFunc, const void *pParam)
|