summaryrefslogtreecommitdiff
path: root/plugins/Nudge/src/options.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/Nudge/src/options.cpp
parent591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff)
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/Nudge/src/options.cpp')
-rw-r--r--plugins/Nudge/src/options.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/Nudge/src/options.cpp b/plugins/Nudge/src/options.cpp
index be47266c4b..fce6159268 100644
--- a/plugins/Nudge/src/options.cpp
+++ b/plugins/Nudge/src/options.cpp
@@ -1,6 +1,6 @@
#include "stdafx.h"
-CNudgeElement* ActualNudge = NULL;
+CNudgeElement* ActualNudge = nullptr;
static int GetSelProto(HWND hwnd, HTREEITEM hItem)
{
@@ -8,7 +8,7 @@ static int GetSelProto(HWND hwnd, HTREEITEM hItem)
TVITEM tvi = { 0 };
tvi.mask = TVIF_IMAGE;
- tvi.hItem = hItem == NULL ? TreeView_GetSelection(hLstView) : hItem;
+ tvi.hItem = hItem == nullptr ? TreeView_GetSelection(hLstView) : hItem;
TreeView_GetItem(hLstView, &tvi);
@@ -19,8 +19,8 @@ static void UpdateControls(HWND hwnd)
{
int proto = nProtocol;
if (GlobalNudge.useByProtocol) {
- proto = GetSelProto(hwnd, NULL);
- ActualNudge = NULL;
+ proto = GetSelProto(hwnd, nullptr);
+ ActualNudge = nullptr;
for (int i = 0; i < arNudges.getCount(); i++) {
CNudgeElement &p = arNudges[i];
if (p.iProtoNumber == proto)
@@ -70,7 +70,7 @@ static void CheckChange(HWND hwnd, HTREEITEM hItem)
int proto = nProtocol;
if (GlobalNudge.useByProtocol) {
proto = GetSelProto(hwnd, hItem);
- ActualNudge = NULL;
+ ActualNudge = nullptr;
for (int i = 0; i < arNudges.getCount(); i++) {
CNudgeElement &p = arNudges[i];
if (p.iProtoNumber == proto)
@@ -174,7 +174,7 @@ static void PopulateProtocolList(HWND hWnd)
TreeView_DeleteAllItems(hLstView);
- TVINSERTSTRUCT tvi = { 0 };
+ TVINSERTSTRUCT tvi = {};
tvi.hParent = TVI_ROOT;
tvi.hInsertAfter = TVI_LAST;
tvi.item.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_STATE | TVIF_SELECTEDIMAGE;