From 92fec1aa22df4c4f1213d33663637c00b753f451 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 22 Aug 2017 15:23:04 +0300 Subject: code cleaning --- plugins/Db3x_mmap/src/dbheaders.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/Db3x_mmap/src/dbheaders.cpp') diff --git a/plugins/Db3x_mmap/src/dbheaders.cpp b/plugins/Db3x_mmap/src/dbheaders.cpp index ac7c34e923..76dc1fb6bd 100644 --- a/plugins/Db3x_mmap/src/dbheaders.cpp +++ b/plugins/Db3x_mmap/src/dbheaders.cpp @@ -40,15 +40,15 @@ int CDb3Mmap::CreateDbHeaders(const DBSignature& _sign) // create user m_dbHeader.ofsUser = m_dbHeader.ofsFileEnd; m_dbHeader.ofsFileEnd += sizeof(DBContact); - SetFilePointer(m_hDbFile, 0, NULL, FILE_BEGIN); + SetFilePointer(m_hDbFile, 0, nullptr, FILE_BEGIN); DWORD bytesWritten; - WriteFile(m_hDbFile, &m_dbHeader, sizeof(m_dbHeader), &bytesWritten, NULL); + WriteFile(m_hDbFile, &m_dbHeader, sizeof(m_dbHeader), &bytesWritten, nullptr); DBContact user = { 0 }; user.signature = DBCONTACT_SIGNATURE; - SetFilePointer(m_hDbFile, m_dbHeader.ofsUser, NULL, FILE_BEGIN); - WriteFile(m_hDbFile, &user, sizeof(DBContact), &bytesWritten, NULL); + SetFilePointer(m_hDbFile, m_dbHeader.ofsUser, nullptr, FILE_BEGIN); + WriteFile(m_hDbFile, &user, sizeof(DBContact), &bytesWritten, nullptr); FlushFileBuffers(m_hDbFile); return 0; } @@ -69,9 +69,9 @@ int CDb3Mmap::CheckDbHeaders(bool bInteractive) if (!memcmp(&m_dbHeader.signature, &dbSignatureSD, sizeof(m_dbHeader.signature))) { if (bInteractive) - if (IDYES == MessageBox(NULL, TranslateW(tszOldHeaders), TranslateT("Obsolete database format"), MB_YESNO | MB_ICONWARNING)) { + if (IDYES == MessageBox(nullptr, TranslateW(tszOldHeaders), TranslateT("Obsolete database format"), MB_YESNO | MB_ICONWARNING)) { wchar_t tszCurPath[MAX_PATH]; - GetModuleFileName(NULL, tszCurPath, _countof(tszCurPath)); + GetModuleFileName(nullptr, tszCurPath, _countof(tszCurPath)); wchar_t *p = wcsrchr(tszCurPath, '\\'); if (p) *p = 0; -- cgit v1.2.3