summaryrefslogtreecommitdiff
path: root/plugins/NoHistory
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/NoHistory
parent591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff)
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/NoHistory')
-rw-r--r--plugins/NoHistory/src/dllmain.cpp6
-rw-r--r--plugins/NoHistory/src/options.cpp8
2 files changed, 7 insertions, 7 deletions
diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp
index ebf869ffdf..f20a68161b 100644
--- a/plugins/NoHistory/src/dllmain.cpp
+++ b/plugins/NoHistory/src/dllmain.cpp
@@ -24,7 +24,7 @@ struct EventListNode {
EventListNode *next;
};
-EventListNode *event_list = 0;
+EventListNode *event_list = nullptr;
// plugin stuff
PLUGININFOEX pluginInfo =
@@ -59,7 +59,7 @@ void RemoveReadEvents(MCONTACT hContact = 0)
bool remove;
mir_cslock lck(list_cs);
- EventListNode *node = event_list, *prev = 0;
+ EventListNode *node = event_list, *prev = nullptr;
while(node) {
remove = false;
if (hContact == 0 || hContact == node->hContact) {
@@ -133,7 +133,7 @@ int OnDatabaseEventAdd(WPARAM hContact, LPARAM hDBEvent)
INT_PTR ServiceClear(WPARAM hContact, LPARAM)
{
- if (MessageBox(0, TranslateT("This operation will PERMANENTLY REMOVE all history for this contact.\nAre you sure you want to do this?"), TranslateT("Clear History"), MB_YESNO | MB_ICONWARNING) == IDYES)
+ if (MessageBox(nullptr, TranslateT("This operation will PERMANENTLY REMOVE all history for this contact.\nAre you sure you want to do this?"), TranslateT("Clear History"), MB_YESNO | MB_ICONWARNING) == IDYES)
RemoveAllEvents(hContact);
return 0;
diff --git a/plugins/NoHistory/src/options.cpp b/plugins/NoHistory/src/options.cpp
index 52e874fb38..92877a43b7 100644
--- a/plugins/NoHistory/src/options.cpp
+++ b/plugins/NoHistory/src/options.cpp
@@ -118,7 +118,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
}
SetAllContactIcons(hwndList);
- SetListGroupIcons(hwndList,(HANDLE)SendMessage(hwndList,CLM_GETNEXTITEM,CLGN_ROOT,0),hItemAll,NULL);
+ SetListGroupIcons(hwndList,(HANDLE)SendMessage(hwndList,CLM_GETNEXTITEM,CLGN_ROOT,0),hItemAll,nullptr);
SendDlgItemMessage(hwndDlg, IDC_SPN_TIMEOUT, UDM_SETRANGE, 0, (LPARAM)MAKELONG(60 * 60, 1));
return FALSE;
@@ -141,7 +141,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
SetAllContactIcons(hwndList);
//fall through
case CLN_CONTACTMOVED:
- SetListGroupIcons(hwndList,(HANDLE)SendMessage(hwndList,CLM_GETNEXTITEM,CLGN_ROOT,0),hItemAll,NULL);
+ SetListGroupIcons(hwndList,(HANDLE)SendMessage(hwndList,CLM_GETNEXTITEM,CLGN_ROOT,0),hItemAll,nullptr);
break;
case CLN_OPTIONSCHANGED:
@@ -157,7 +157,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
// Find clicked item
DWORD hitFlags;
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_HITTEST, (WPARAM)&hitFlags, MAKELPARAM(nm->pt.x,nm->pt.y));
- if (hItem == NULL || !(hitFlags & CLCHT_ONITEMEXTRA))
+ if (hItem == nullptr || !(hitFlags & CLCHT_ONITEMEXTRA))
break;
// Get image in clicked column (0=none, 1=visible, 2=invisible)
@@ -181,7 +181,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
SetAllChildIcons(hwndList, hItem, nm->iColumn, iImage);
}
// Update the all/none icons
- SetListGroupIcons(hwndList, (HANDLE)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, NULL);
+ SetListGroupIcons(hwndList, (HANDLE)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, nullptr);
// Activate Apply button
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);