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/SpellChecker/src/spellchecker.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/SpellChecker/src/spellchecker.cpp')
-rw-r--r-- | plugins/SpellChecker/src/spellchecker.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/plugins/SpellChecker/src/spellchecker.cpp b/plugins/SpellChecker/src/spellchecker.cpp index 4726369e2b..935749e4ac 100644 --- a/plugins/SpellChecker/src/spellchecker.cpp +++ b/plugins/SpellChecker/src/spellchecker.cpp @@ -39,13 +39,13 @@ HINSTANCE hInst; int hLangpack = 0; -HANDLE hDictionariesFolder = NULL; +HANDLE hDictionariesFolder = nullptr; wchar_t *dictionariesFolder; -HANDLE hCustomDictionariesFolder = NULL; +HANDLE hCustomDictionariesFolder = nullptr; wchar_t *customDictionariesFolder; -HANDLE hFlagsDllFolder = NULL; +HANDLE hFlagsDllFolder = nullptr; wchar_t *flagsDllFolder; HBITMAP hCheckedBmp; @@ -135,12 +135,12 @@ static int ModulesLoaded(WPARAM, LPARAM) // Load flags dll wchar_t flag_file[MAX_PATH]; mir_snwprintf(flag_file, L"%s\\flags_icons.dll", flagsDllFolder); - HMODULE hFlagsDll = LoadLibraryEx(flag_file, NULL, LOAD_LIBRARY_AS_DATAFILE); + HMODULE hFlagsDll = LoadLibraryEx(flag_file, nullptr, LOAD_LIBRARY_AS_DATAFILE); wchar_t path[MAX_PATH]; GetModuleFileName(hInst, path, MAX_PATH); - SKINICONDESC sid = { 0 }; + SKINICONDESC sid = {}; sid.flags = SIDF_ALL_UNICODE | SIDF_SORTED; sid.section.w = LPGENW("Spell Checker") L"/" LPGENW("Flags"); @@ -153,26 +153,26 @@ static int ModulesLoaded(WPARAM, LPARAM) mir_snprintf(lang, "spell_lang_%d", i); sid.pszName = lang; - HICON hFlag = NULL, hFlagIcoLib = NULL; - if (hFlagsDll != NULL) + HICON hFlag = nullptr, hFlagIcoLib = nullptr; + if (hFlagsDll != nullptr) hFlag = (HICON)LoadImage(hFlagsDll, p->language, IMAGE_ICON, 16, 16, 0); - if (hFlag != NULL) { + if (hFlag != nullptr) { sid.hDefaultIcon = hFlag; - sid.defaultFile.w = NULL; + sid.defaultFile.w = nullptr; sid.iDefaultIndex = 0; } else { hFlagIcoLib = IcoLib_GetIcon("spellchecker_unknown"); sid.hDefaultIcon = hFlagIcoLib; - sid.defaultFile.w = NULL; + sid.defaultFile.w = nullptr; sid.iDefaultIndex = 0; } // Oki, lets add to IcoLib, then p->hIcolib = IcoLib_AddIcon(&sid); - if (hFlag != NULL) + if (hFlag != nullptr) DestroyIcon(hFlag); else IcoLib_ReleaseIcon(hFlagIcoLib); @@ -248,7 +248,7 @@ extern "C" int __declspec(dllexport) Load(void) CreateServiceFunction(MS_SPELLCHECKER_REMOVE_RICHEDIT, RemoveContactTextBoxService); CreateServiceFunction(MS_SPELLCHECKER_SHOW_POPUP_MENU, ShowPopupMenuService); - hCheckedBmp = LoadBitmap(NULL, MAKEINTRESOURCE(OBM_CHECK)); + hCheckedBmp = LoadBitmap(nullptr, MAKEINTRESOURCE(OBM_CHECK)); if (GetObject(hCheckedBmp, sizeof(bmpChecked), &bmpChecked) == 0) bmpChecked.bmHeight = bmpChecked.bmWidth = 10; |