From a7c24ca48995cf2bf436156302f96b91bf135409 Mon Sep 17 00:00:00 2001 From: Goraf <22941576+Goraf@users.noreply.github.com> Date: Mon, 13 Nov 2017 15:03:31 +0100 Subject: Code modernize ... * replace 0/NULL with nullptr [using clang-tidy] --- plugins/PluginUpdater/src/checksum.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/PluginUpdater/src/checksum.cpp') 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 -- cgit v1.2.3