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/Clist_nicer/src/clisttray.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/Clist_nicer/src/clisttray.cpp')
-rw-r--r-- | plugins/Clist_nicer/src/clisttray.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/plugins/Clist_nicer/src/clisttray.cpp b/plugins/Clist_nicer/src/clisttray.cpp index 7196bb68e4..7669cfc678 100644 --- a/plugins/Clist_nicer/src/clisttray.cpp +++ b/plugins/Clist_nicer/src/clisttray.cpp @@ -44,31 +44,31 @@ int TrayCalcChanged(const char *szChangedProto, int averageMode, int netProtoCou hIcon = (hIcon) ? CopyIcon(hIcon) : ImageList_GetIcon(hCListImages, iIcon, ILD_NORMAL);
return pcli->pfnTrayIconSetBaseInfo(hIcon, szChangedProto);
}
- if (pcli->trayIcon == NULL || pcli->trayIcon[0].szProto == NULL) {
- iIcon = IconFromStatusMode(NULL, averageMode, 0, &hIcon);
+ if (pcli->trayIcon == nullptr || pcli->trayIcon[0].szProto == nullptr) {
+ iIcon = IconFromStatusMode(nullptr, averageMode, 0, &hIcon);
hIcon = (hIcon) ? CopyIcon(hIcon) : ImageList_GetIcon(hCListImages, iIcon, ILD_NORMAL);
- return pcli->pfnTrayIconSetBaseInfo(hIcon, NULL);
+ return pcli->pfnTrayIconSetBaseInfo(hIcon, nullptr);
}
pcli->pfnTrayIconDestroy(hwnd);
pcli->pfnTrayIconInit(hwnd);
}
else {
- iIcon = IconFromStatusMode(NULL, averageMode, 0, &hIcon);
+ iIcon = IconFromStatusMode(nullptr, averageMode, 0, &hIcon);
hIcon = (hIcon) ? CopyIcon(hIcon) : ImageList_GetIcon(hCListImages, iIcon, ILD_NORMAL);
- return pcli->pfnTrayIconSetBaseInfo(hIcon, NULL);
+ return pcli->pfnTrayIconSetBaseInfo(hIcon, nullptr);
}
}
else {
switch (db_get_b(NULL, "CList", "TrayIcon", SETTING_TRAYICON_DEFAULT)) {
case SETTING_TRAYICON_CYCLE:
iIcon = IconFromStatusMode(szChangedProto, CallProtoService(szChangedProto, PS_GETSTATUS, 0, 0), 0, &hIcon);
- pcli->cycleTimerId = SetTimer(NULL, 0, db_get_w(NULL, "CList", "CycleTime", SETTING_CYCLETIME_DEFAULT) * 1000, pcli->pfnTrayCycleTimerProc);
+ pcli->cycleTimerId = SetTimer(nullptr, 0, db_get_w(NULL, "CList", "CycleTime", SETTING_CYCLETIME_DEFAULT) * 1000, pcli->pfnTrayCycleTimerProc);
hIcon = (hIcon) ? CopyIcon(hIcon) : ImageList_GetIcon(hCListImages, iIcon, ILD_NORMAL);
- return pcli->pfnTrayIconSetBaseInfo(hIcon, NULL);
+ return pcli->pfnTrayIconSetBaseInfo(hIcon, nullptr);
case SETTING_TRAYICON_MULTI:
if (!pcli->trayIcon)
- pcli->pfnTrayIconRemove(NULL, NULL);
+ pcli->pfnTrayIconRemove(nullptr, nullptr);
else if (db_get_b(NULL, "CList", "AlwaysMulti", SETTING_ALWAYSMULTI_DEFAULT)) {
iIcon = IconFromStatusMode(szChangedProto, CallProtoService(szChangedProto, PS_GETSTATUS, 0, 0), 0, &hIcon);
hIcon = (hIcon) ? CopyIcon(hIcon) : ImageList_GetIcon(hCListImages, iIcon, ILD_NORMAL);
@@ -82,14 +82,14 @@ int TrayCalcChanged(const char *szChangedProto, int averageMode, int netProtoCou ptrA szProto(db_get_sa(NULL, "CList", "PrimaryStatus"));
iIcon = IconFromStatusMode(szProto, szProto ? CallProtoService(szProto, PS_GETSTATUS, 0, 0) : CallService(MS_CLIST_GETSTATUSMODE, 0, 0), 0, &hIcon);
hIcon = (hIcon) ? CopyIcon(hIcon) : ImageList_GetIcon(hCListImages, iIcon, ILD_NORMAL);
- return pcli->pfnTrayIconSetBaseInfo(hIcon, NULL);
+ return pcli->pfnTrayIconSetBaseInfo(hIcon, nullptr);
}
}
}
else {
- iIcon = IconFromStatusMode(NULL, averageMode, 0, &hIcon);
+ iIcon = IconFromStatusMode(nullptr, averageMode, 0, &hIcon);
hIcon = (hIcon) ? CopyIcon(hIcon) : ImageList_GetIcon(hCListImages, iIcon, ILD_NORMAL);
- return pcli->pfnTrayIconSetBaseInfo(hIcon, NULL);
+ return pcli->pfnTrayIconSetBaseInfo(hIcon, nullptr);
}
return -1;
|