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/GmailNotifier/src/utility.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/GmailNotifier/src/utility.cpp')
-rw-r--r-- | plugins/GmailNotifier/src/utility.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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 |