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/Popup/src/notifications.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/Popup/src/notifications.cpp')
-rw-r--r-- | plugins/Popup/src/notifications.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/Popup/src/notifications.cpp b/plugins/Popup/src/notifications.cpp index 1c9759e201..09bd94e332 100644 --- a/plugins/Popup/src/notifications.cpp +++ b/plugins/Popup/src/notifications.cpp @@ -42,7 +42,7 @@ void LoadNotifications() POPUPNOTIFICATION notification = { 0 };
notification.cbSize = sizeof(notification);
notification.actionCount = 0;
- notification.lpActions = 0;
+ notification.lpActions = nullptr;
mir_strncpy(notification.lpzGroup, "Misc", sizeof(notification.lpzName));
mir_strncpy(notification.lpzName, "Warning", sizeof(notification.lpzName));
@@ -158,12 +158,12 @@ void LoadNotificationSettings(POPUPTREEDATA *ptd, char* szModul) mir_snprintf(setting, "{%s/%s}leftAction", ptd->notification.lpzGroup, ptd->notification.lpzName);
char *szTmp = db_get_s(NULL, szModul, setting, ptd->notification.lpzLAction);
mir_strncpy(ptd->leftAction, szTmp, sizeof(ptd->leftAction));
- mir_free(szTmp); szTmp = NULL;
+ mir_free(szTmp); szTmp = nullptr;
mir_snprintf(setting, "{%s/%s}rightAction", ptd->notification.lpzGroup, ptd->notification.lpzName);
szTmp = db_get_s(NULL, szModul, setting, ptd->notification.lpzRAction);
mir_strncpy(ptd->rightAction, szTmp, sizeof(ptd->rightAction));
- mir_free(szTmp); szTmp = NULL;
+ mir_free(szTmp); szTmp = nullptr;
}
}
@@ -218,7 +218,7 @@ HANDLE FindTreeData(LPTSTR group, LPTSTR name, BYTE typ) if (p->typ == typ && (!group || (mir_wstrcmp(p->pszTreeRoot, group) == 0)) && (!name || (mir_wstrcmp(p->pszDescription, name) == 0)))
return p;
}
- return NULL;
+ return nullptr;
}
void FillNotificationData(POPUPDATA2 *ppd, DWORD *disableWhen)
@@ -264,7 +264,7 @@ bool PerformAction(HANDLE hNotification, HWND hwnd, UINT message, WPARAM wparam, return false;
POPUPTREEDATA *ptd = (POPUPTREEDATA *)hNotification;
- char *lpzAction = NULL;
+ char *lpzAction = nullptr;
switch (message) {
case WM_LBUTTONUP:
case WM_COMMAND:
|