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/CryptoPP/src/main.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/CryptoPP/src/main.cpp')
-rw-r--r-- | plugins/CryptoPP/src/main.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/CryptoPP/src/main.cpp b/plugins/CryptoPP/src/main.cpp index dc5e3c67e9..9adee52785 100644 --- a/plugins/CryptoPP/src/main.cpp +++ b/plugins/CryptoPP/src/main.cpp @@ -5,8 +5,8 @@ LPCSTR szModuleName = MODULENAME; LPCSTR szVersionStr = MODULENAME" DLL (" __VERSION_STRING_DOTS ")";
HINSTANCE g_hInst;
-HANDLE hPGPPRIV = NULL;
-HANDLE hRSA4096 = NULL;
+HANDLE hPGPPRIV = nullptr;
+HANDLE hRSA4096 = nullptr;
mir_cs localQueueMutex;
mir_cs localContextMutex;
@@ -72,15 +72,15 @@ extern "C" __declspec(dllexport) int Unload() BOOL ExtractFileFromResource(HANDLE FH, int ResType, int ResId, DWORD* Size)
{
HRSRC RH = FindResource(g_hInst, MAKEINTRESOURCE(ResId), MAKEINTRESOURCE(ResType));
- if (RH == NULL)
+ if (RH == nullptr)
return FALSE;
PBYTE RP = (PBYTE)LoadResource(g_hInst, RH);
- if (RP == NULL)
+ if (RP == nullptr)
return FALSE;
DWORD x, s = SizeofResource(g_hInst, RH);
- if (!WriteFile(FH, RP, s, &x, NULL)) return FALSE;
+ if (!WriteFile(FH, RP, s, &x, nullptr)) return FALSE;
if (x != s) return FALSE;
if (Size) *Size = s;
return TRUE;
@@ -88,12 +88,12 @@ BOOL ExtractFileFromResource(HANDLE FH, int ResType, int ResId, DWORD* Size) void ExtractFile(char *FileName, int ResType, int ResId)
{
- HANDLE FH = CreateFile(FileName, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL);
+ HANDLE FH = CreateFile(FileName, GENERIC_WRITE, 0, nullptr, CREATE_ALWAYS, 0, nullptr);
if (FH == INVALID_HANDLE_VALUE)
return;
- if (!ExtractFileFromResource(FH, ResType, ResId, NULL))
- MessageBoxA(0, "Can't extract", "!!!", MB_OK);
+ if (!ExtractFileFromResource(FH, ResType, ResId, nullptr))
+ MessageBoxA(nullptr, "Can't extract", "!!!", MB_OK);
CloseHandle(FH);
}
|