summaryrefslogtreecommitdiff
path: root/plugins/AvatarHistory/src/popup.cpp
diff options
context:
space:
mode:
authorGoraf <22941576+Goraf@users.noreply.github.com>2017-11-13 15:03:31 +0100
committerGoraf <22941576+Goraf@users.noreply.github.com>2017-11-13 15:07:33 +0100
commita7c24ca48995cf2bf436156302f96b91bf135409 (patch)
tree953835509ff1b778833e78fd7b74b05e05e77c84 /plugins/AvatarHistory/src/popup.cpp
parent591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff)
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/AvatarHistory/src/popup.cpp')
-rw-r--r--plugins/AvatarHistory/src/popup.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/AvatarHistory/src/popup.cpp b/plugins/AvatarHistory/src/popup.cpp
index 9fee0bb3ff..6d4ef5c8ab 100644
--- a/plugins/AvatarHistory/src/popup.cpp
+++ b/plugins/AvatarHistory/src/popup.cpp
@@ -26,7 +26,7 @@ Boston, MA 02111-1307, USA.
LRESULT CALLBACK PopupWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
-HWND hPopupWindow = NULL;
+HWND hPopupWindow = nullptr;
static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
@@ -43,7 +43,7 @@ void InitPopups()
// window needed for popup commands
hPopupWindow = CreateWindowEx(WS_EX_TOOLWINDOW, L"static", _A2W(MODULE_NAME) L"_PopupWindow",
0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP,
- NULL, hInst, NULL);
+ nullptr, hInst, nullptr);
SetWindowLongPtr(hPopupWindow, GWLP_WNDPROC, (LONG_PTR)PopupWndProc);
}
@@ -56,14 +56,14 @@ void DeInitPopups()
// Show an error popup
void ShowErrPopup(const wchar_t *description, const wchar_t *title)
{
- ShowPopupEx(NULL, title == NULL ? _A2W(MODULE_NAME) L" Error" : title, description,
- NULL, POPUP_TYPE_ERROR, NULL);
+ ShowPopupEx(NULL, title == nullptr ? _A2W(MODULE_NAME) L" Error" : title, description,
+ nullptr, POPUP_TYPE_ERROR, nullptr);
}
void ShowTestPopup(MCONTACT hContact, const wchar_t *title, const wchar_t *description, const Options *op)
{
- ShowPopupEx(hContact, title, description, NULL, POPUP_TYPE_TEST, op);
+ ShowPopupEx(hContact, title, description, nullptr, POPUP_TYPE_TEST, op);
}
@@ -101,13 +101,13 @@ void ShowPopupEx(MCONTACT hContact, const wchar_t *title, const wchar_t *descrip
((PopupDataType*)ppd.PluginData)->plugin_data = plugin_data;
((PopupDataType*)ppd.PluginData)->hIcon = ppd.lchIcon;
- if (title != NULL)
+ if (title != nullptr)
mir_wstrncpy(ppd.lptzContactName, title, _countof(ppd.lptzContactName));
else if (hContact != NULL)
mir_wstrncpy(ppd.lptzContactName, (wchar_t *)pcli->pfnGetContactDisplayName(hContact, 0),
_countof(ppd.lptzContactName));
- if (description != NULL)
+ if (description != nullptr)
mir_wstrncpy(ppd.lptzText, description, _countof(ppd.lptzText));
if (type == POPUP_TYPE_NORMAL || type == POPUP_TYPE_TEST) {
@@ -163,7 +163,7 @@ void ShowPopupEx(MCONTACT hContact, const wchar_t *title, const wchar_t *descrip
PUAddPopupT(&ppd);
}
else {
- MessageBox(NULL, description, title ? title : (wchar_t *)pcli->pfnGetContactDisplayName(hContact, 0),
+ MessageBox(nullptr, description, title ? title : (wchar_t *)pcli->pfnGetContactDisplayName(hContact, 0),
MB_OK);
}