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/NewXstatusNotify/src/utils.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/NewXstatusNotify/src/utils.cpp')
-rw-r--r-- | plugins/NewXstatusNotify/src/utils.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/NewXstatusNotify/src/utils.cpp b/plugins/NewXstatusNotify/src/utils.cpp index 56ef4931c7..120964b038 100644 --- a/plugins/NewXstatusNotify/src/utils.cpp +++ b/plugins/NewXstatusNotify/src/utils.cpp @@ -28,7 +28,7 @@ bool CheckMsgWnd(MCONTACT hContact) if (Srmm_GetWindowData(hContact, mwd) != NULL)
return false;
- if (mwd.hwndWindow != NULL && (mwd.uState & MSG_WINDOW_STATE_EXISTS))
+ if (mwd.hwndWindow != nullptr && (mwd.uState & MSG_WINDOW_STATE_EXISTS))
return true;
return false;
@@ -49,14 +49,14 @@ int DBGetStringDefault(MCONTACT hContact, const char *szModule, const char *szSe void ShowLog(wchar_t *file)
{
- INT_PTR res = (INT_PTR)ShellExecute(NULL, L"open", file, NULL, NULL, SW_SHOW);
+ INT_PTR res = (INT_PTR)ShellExecute(nullptr, L"open", file, nullptr, nullptr, SW_SHOW);
if (res <= 32) // error
- MessageBox(0, TranslateT("Can't open the log file!"), TranslateT("NewXstatusNotify"), MB_OK | MB_ICONERROR);
+ MessageBox(nullptr, TranslateT("Can't open the log file!"), TranslateT("NewXstatusNotify"), MB_OK | MB_ICONERROR);
}
BOOL StatusHasAwayMessage(char *szProto, int status)
{
- if (szProto != NULL) {
+ if (szProto != nullptr) {
unsigned long iSupportsSM = (unsigned long)CallProtoService(szProto, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0);
return (iSupportsSM & Proto_Status2Flag(status)) ? TRUE : FALSE;
}
@@ -87,7 +87,7 @@ void LogToFile(wchar_t *stzText) void AddCR(CMStringW &str, const wchar_t *stzText)
{
- if (stzText == NULL)
+ if (stzText == nullptr)
return;
CMStringW res(stzText);
|