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/GmailNotifier/src/utility.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/GmailNotifier/src/utility.cpp') diff --git a/plugins/GmailNotifier/src/utility.cpp b/plugins/GmailNotifier/src/utility.cpp index 9aa00d8e79..eb243b8f57 100644 --- a/plugins/GmailNotifier/src/utility.cpp +++ b/plugins/GmailNotifier/src/utility.cpp @@ -32,7 +32,7 @@ void BuildList(void) BOOL GetBrowser(char *str) { - HKEY hKey = NULL; + HKEY hKey = nullptr; char *strKey; char strIE[] = "Applications\\iexplore.exe\\shell\\open\\command"; char strDefault[] = "https\\shell\\open\\command"; @@ -56,11 +56,11 @@ BOOL GetBrowser(char *str) // Data size DWORD cbData = 0; // Get the default value - if (RegQueryValueExA(hKey, NULL, NULL, NULL, NULL, &cbData) == ERROR_SUCCESS && cbData > 0) { - if (RegQueryValueExA(hKey, NULL, NULL, NULL, (LPBYTE)str, &cbData) == ERROR_SUCCESS) { - if ((strKey = strstr(str, "%1")) != NULL) + if (RegQueryValueExA(hKey, nullptr, nullptr, nullptr, nullptr, &cbData) == ERROR_SUCCESS && cbData > 0) { + if (RegQueryValueExA(hKey, nullptr, nullptr, nullptr, (LPBYTE)str, &cbData) == ERROR_SUCCESS) { + if ((strKey = strstr(str, "%1")) != nullptr) *(strKey--) = '\0'; - if ((strKey = strstr(str, "-")) != NULL) + if ((strKey = strstr(str, "-")) != nullptr) *(strKey--) = '\0'; RegCloseKey(hKey); return TRUE; @@ -76,5 +76,5 @@ Account* GetAccountByContact(MCONTACT hContact) if (acc[i].hContact == hContact) return &acc[i]; - return NULL; + return nullptr; } \ No newline at end of file -- cgit v1.2.3