diff options
author | Goraf <22941576+Goraf@users.noreply.github.com> | 2017-11-13 15:03:31 +0100 |
---|---|---|
committer | Goraf <22941576+Goraf@users.noreply.github.com> | 2017-11-13 15:07:33 +0100 |
commit | a7c24ca48995cf2bf436156302f96b91bf135409 (patch) | |
tree | 953835509ff1b778833e78fd7b74b05e05e77c84 /plugins/PluginUpdater/src/checksum.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/PluginUpdater/src/checksum.cpp')
-rw-r--r-- | plugins/PluginUpdater/src/checksum.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/PluginUpdater/src/checksum.cpp b/plugins/PluginUpdater/src/checksum.cpp index 67f2493611..889696c4b0 100644 --- a/plugins/PluginUpdater/src/checksum.cpp +++ b/plugins/PluginUpdater/src/checksum.cpp @@ -25,12 +25,12 @@ struct MFileMapping MFileMapping(const wchar_t* ptszFileName)
{
- ptr = NULL;
- hMap = NULL;
+ ptr = nullptr;
+ hMap = nullptr;
- hFile = CreateFile(ptszFileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
+ hFile = CreateFile(ptszFileName, GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, 0, nullptr);
if (hFile != INVALID_HANDLE_VALUE)
- hMap = CreateFileMapping(hFile, NULL, PAGE_WRITECOPY, 0, 0, NULL);
+ hMap = CreateFileMapping(hFile, nullptr, PAGE_WRITECOPY, 0, 0, nullptr);
if (hMap)
ptr = (PBYTE)MapViewOfFile(hMap, FILE_MAP_COPY, 0, 0, 0);
}
@@ -79,7 +79,7 @@ int CalculateModuleHash(const wchar_t *filename, char *szDest) if (map.hFile == INVALID_HANDLE_VALUE)
return RESULT_NOTFOUND;
- if (map.ptr == NULL)
+ if (map.ptr == nullptr)
return RESULT_READERROR;
// check minimum and maximum size
|