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/dbintf.cpp | |
parent | 94dde7112f11c5963aa620c692170d02fe65a2a7 (diff) |
code cleaning
Diffstat (limited to 'plugins/Db3x_mmap/src/dbintf.cpp')
-rw-r--r-- | plugins/Db3x_mmap/src/dbintf.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/Db3x_mmap/src/dbintf.cpp b/plugins/Db3x_mmap/src/dbintf.cpp index 2bf91ac90b..109dfb99da 100644 --- a/plugins/Db3x_mmap/src/dbintf.cpp +++ b/plugins/Db3x_mmap/src/dbintf.cpp @@ -71,7 +71,7 @@ CDb3Mmap::~CDb3Mmap() HeapDestroy(m_hModHeap);
// destroy map
- KillTimer(NULL, m_flushBuffersTimerId);
+ KillTimer(nullptr, m_flushBuffersTimerId);
if (m_pDbCache) {
FlushViewOfFile(m_pDbCache, 0);
UnmapViewOfFile(m_pDbCache);
@@ -89,8 +89,8 @@ CDb3Mmap::~CDb3Mmap() // update profile last modified time
if (!m_bReadOnly) {
DWORD bytesWritten;
- SetFilePointer(m_hDbFile, 0, NULL, FILE_BEGIN);
- WriteFile(m_hDbFile, &dbSignatureU, 1, &bytesWritten, NULL);
+ SetFilePointer(m_hDbFile, 0, nullptr, FILE_BEGIN);
+ WriteFile(m_hDbFile, &dbSignatureU, 1, &bytesWritten, nullptr);
}
if (m_hDbFile != INVALID_HANDLE_VALUE)
@@ -119,14 +119,14 @@ int CDb3Mmap::Load(bool bSkipInit) if (m_bShared)
dwMode |= FILE_SHARE_WRITE;
if (m_bReadOnly)
- m_hDbFile = CreateFile(m_tszProfileName, GENERIC_READ, dwMode, NULL, OPEN_EXISTING, 0, NULL);
+ m_hDbFile = CreateFile(m_tszProfileName, GENERIC_READ, dwMode, nullptr, OPEN_EXISTING, 0, nullptr);
else
- m_hDbFile = CreateFile(m_tszProfileName, GENERIC_READ | GENERIC_WRITE, dwMode, NULL, OPEN_ALWAYS, 0, NULL);
+ m_hDbFile = CreateFile(m_tszProfileName, GENERIC_READ | GENERIC_WRITE, dwMode, nullptr, OPEN_ALWAYS, 0, nullptr);
if (m_hDbFile == INVALID_HANDLE_VALUE)
return EGROKPRF_CANTREAD;
- if (!ReadFile(m_hDbFile, &m_dbHeader, sizeof(m_dbHeader), &dummy, NULL)) {
+ if (!ReadFile(m_hDbFile, &m_dbHeader, sizeof(m_dbHeader), &dummy, nullptr)) {
CloseHandle(m_hDbFile);
return EGROKPRF_CANTREAD;
}
@@ -160,7 +160,7 @@ int CDb3Mmap::Load(bool bSkipInit) int CDb3Mmap::Create()
{
- m_hDbFile = CreateFile(m_tszProfileName, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, 0, NULL);
+ m_hDbFile = CreateFile(m_tszProfileName, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, nullptr, CREATE_ALWAYS, 0, nullptr);
return (m_hDbFile == INVALID_HANDLE_VALUE);
}
|