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/TranslitSwitcher/src | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/TranslitSwitcher/src')
-rw-r--r-- | plugins/TranslitSwitcher/src/Layoutproc.cpp | 28 | ||||
-rw-r--r-- | plugins/TranslitSwitcher/src/TranslitSwitcher.cpp | 2 |
2 files changed, 15 insertions, 15 deletions
diff --git a/plugins/TranslitSwitcher/src/Layoutproc.cpp b/plugins/TranslitSwitcher/src/Layoutproc.cpp index e36052669f..74fdc4f130 100644 --- a/plugins/TranslitSwitcher/src/Layoutproc.cpp +++ b/plugins/TranslitSwitcher/src/Layoutproc.cpp @@ -20,13 +20,13 @@ Boston, MA 02111-1307, USA. #include "stdafx.h"
SMADD_BATCHPARSE2 smgp;
-SMADD_BATCHPARSERES *smileyPrs = NULL;
+SMADD_BATCHPARSERES *smileyPrs = nullptr;
bool isItSmiley(unsigned int position)
{
unsigned int j;
- if (smileyPrs == NULL)
+ if (smileyPrs == nullptr)
return false;
for (j = 0; j < smgp.numSmileys; j++) {
@@ -47,10 +47,10 @@ static DWORD CALLBACK StreamOutCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG wchar_t* Message_GetFromStream(HWND hwndRtf, DWORD dwPassedFlags)
{
- if (hwndRtf == 0)
- return NULL;
+ if (hwndRtf == nullptr)
+ return nullptr;
- wchar_t *pszText = NULL;
+ wchar_t *pszText = nullptr;
EDITSTREAM stream = { 0 };
stream.pfnCallback = StreamOutCallback;
stream.dwCookie = (DWORD_PTR)&pszText;
@@ -365,13 +365,13 @@ void Invert(wchar_t *str) void SwitchLayout(bool lastword)
{
HWND hwnd = GetForegroundWindow();
- if (hwnd == NULL)
+ if (hwnd == nullptr)
return;
DWORD dwProcessID;
DWORD dwThreadID = GetWindowThreadProcessId(hwnd, &dwProcessID);
HWND hwnd2 = GetFocus();
- if (hwnd2 == NULL)
+ if (hwnd2 == nullptr)
return;
wchar_t szClassName[MAX_PATH];
@@ -424,7 +424,7 @@ void SwitchLayout(bool lastword) }
}
- if (smileyPrs != NULL)
+ if (smileyPrs != nullptr)
CallService(MS_SMILEYADD_BATCHFREE, 0, (LPARAM)smileyPrs);
POPUPDATAT pd = { 0 };
@@ -489,7 +489,7 @@ void SwitchLayout(bool lastword) }
}
- if (smileyPrs != NULL)
+ if (smileyPrs != nullptr)
CallService(MS_SMILEYADD_BATCHFREE, 0, (LPARAM)smileyPrs);
if (somethingIsSelected)
@@ -506,11 +506,11 @@ void SwitchLayout(bool lastword) void TranslitLayout(bool lastword)
{
HWND hwnd = GetForegroundWindow();
- if (hwnd == NULL)
+ if (hwnd == nullptr)
return;
HWND hwnd2 = GetFocus();
- if (hwnd2 == NULL)
+ if (hwnd2 == nullptr)
return;
wchar_t szClassName[16];
@@ -573,11 +573,11 @@ void TranslitLayout(bool lastword) void InvertCase(bool lastword)
{
HWND hwnd = GetForegroundWindow();
- if (hwnd == NULL)
+ if (hwnd == nullptr)
return;
HWND hwnd2 = GetFocus();
- if (hwnd2 == NULL)
+ if (hwnd2 == nullptr)
return;
wchar_t szClassName[16];
@@ -697,7 +697,7 @@ int OnButtonPressed(WPARAM, LPARAM lParam) sel[i] = tchr;
}
}
- if (smileyPrs != NULL)
+ if (smileyPrs != nullptr)
CallService(MS_SMILEYADD_BATCHFREE, 0, (LPARAM)smileyPrs);
break;
}
diff --git a/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp b/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp index 5f529e3837..d61b374d12 100644 --- a/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp +++ b/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp @@ -19,7 +19,7 @@ Boston, MA 02111-1307, USA. #include "stdafx.h"
-HINSTANCE hInst = NULL;
+HINSTANCE hInst = nullptr;
int hLangpack;
|