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/TrafficCounter/src/opttree.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/TrafficCounter/src/opttree.cpp')
-rw-r--r-- | plugins/TrafficCounter/src/opttree.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/TrafficCounter/src/opttree.cpp b/plugins/TrafficCounter/src/opttree.cpp index 1fb69b220e..c3d6cfdc7d 100644 --- a/plugins/TrafficCounter/src/opttree.cpp +++ b/plugins/TrafficCounter/src/opttree.cpp @@ -47,7 +47,7 @@ void OptTree_Translate(HWND hwndTree) HTREEITEM hItem = TreeView_GetRoot(hwndTree);
while (hItem)
{
- HTREEITEM hItemTmp = 0;
+ HTREEITEM hItemTmp = nullptr;
OptTree_TranslateItem(hwndTree, hItem);
if (hItemTmp = TreeView_GetChild(hwndTree, hItem))
@@ -98,7 +98,7 @@ HTREEITEM OptTree_FindNamedTreeItemAt(HWND hwndTree, HTREEITEM hItem, const wcha tvi.hItem = TreeView_GetNextSibling(hwndTree, tvi.hItem);
}
- return NULL;
+ return nullptr;
}
HTREEITEM OptTree_AddItem(HWND hwndTree, wchar_t *name, LPARAM lParam, int iconIndex)
@@ -108,7 +108,7 @@ HTREEITEM OptTree_AddItem(HWND hwndTree, wchar_t *name, LPARAM lParam, int iconI wchar_t* sectionName;
int sectionLevel = 0;
- HTREEITEM hSection = NULL, result = NULL;
+ HTREEITEM hSection = nullptr, result = nullptr;
mir_wstrcpy(itemName, name);
sectionName = itemName;
@@ -130,7 +130,7 @@ HTREEITEM OptTree_AddItem(HWND hwndTree, wchar_t *name, LPARAM lParam, int iconI {
if (!hItem)
{
- TVINSERTSTRUCT tvis = {0};
+ TVINSERTSTRUCT tvis = {};
tvis.hParent = hSection;
tvis.hInsertAfter = TVI_LAST;//TVI_SORT;
@@ -191,7 +191,7 @@ BOOL OptTree_ProcessMessage(HWND hwnd, UINT msg, WPARAM, LPARAM lparam, BOOL*, wchar_t* sectionName;
int sectionLevel = 0;
- HTREEITEM hSection = NULL;
+ HTREEITEM hSection = nullptr;
if (options[indx].szOptionName)
mir_wstrcpy(itemName, options[indx].szOptionName);
else
@@ -218,7 +218,7 @@ BOOL OptTree_ProcessMessage(HWND hwnd, UINT msg, WPARAM, LPARAM lparam, BOOL*, {
if (!hItem)
{
- TVINSERTSTRUCT tvis = {0};
+ TVINSERTSTRUCT tvis = {};
tvis.hParent = hSection;
tvis.hInsertAfter = TVI_LAST;//TVI_SORT;
@@ -254,7 +254,7 @@ BOOL OptTree_ProcessMessage(HWND hwnd, UINT msg, WPARAM, LPARAM lparam, BOOL*, OptTree_Translate(hwndTree);
ShowWindow(hwndTree, SW_SHOW);
- TreeView_SelectItem(hwndTree, OptTree_FindNamedTreeItemAt(hwndTree, 0, NULL));
+ TreeView_SelectItem(hwndTree, OptTree_FindNamedTreeItemAt(hwndTree, nullptr, nullptr));
break;
}
|