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/coolsblib.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/Clist_nicer/src/coolsblib.cpp')
-rw-r--r-- | plugins/Clist_nicer/src/coolsblib.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/plugins/Clist_nicer/src/coolsblib.cpp b/plugins/Clist_nicer/src/coolsblib.cpp index 61da1b3567..f669a400a9 100644 --- a/plugins/Clist_nicer/src/coolsblib.cpp +++ b/plugins/Clist_nicer/src/coolsblib.cpp @@ -44,13 +44,13 @@ SCROLLBAR* GetScrollBarFromHwnd(HWND hwnd, UINT nBar) {
SCROLLWND *sw = GetScrollWndFromHwnd(hwnd);
if (!sw)
- return 0;
+ return nullptr;
if (nBar == SB_HORZ)
return &sw->sbarHorz;
if (nBar == SB_VERT)
return &sw->sbarVert;
- return 0;
+ return nullptr;
}
BOOL WINAPI CoolSB_IsCoolScrollEnabled(HWND hwnd)
@@ -74,7 +74,7 @@ BOOL GetScrollRect(SCROLLWND *sw, UINT nBar, HWND hwnd, RECT *rect); typedef BOOL(WINAPI *WPROC)(HWND, UINT, UINT);
-static WPROC pEnableScrollBar = 0;
+static WPROC pEnableScrollBar = nullptr;
void WINAPI CoolSB_SetESBProc(WPROC proc)
{
@@ -106,7 +106,7 @@ static void RedrawNonClient(HWND hwnd, BOOL fFrameChanged) SendMessage(hwnd, WM_NCPAINT, 1, 0);
}
else {
- SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE
+ SetWindowPos(hwnd, nullptr, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE
| SWP_FRAMECHANGED | SWP_DRAWFRAME);
}
}
@@ -135,7 +135,7 @@ static SCROLLINFO *GetScrollInfoFromHwnd(HWND hwnd, int fnBar) {
SCROLLBAR *sb = GetScrollBarFromHwnd(hwnd, fnBar);
- if (sb == 0)
+ if (sb == nullptr)
return FALSE;
if (fnBar == SB_HORZ) {
@@ -145,7 +145,7 @@ static SCROLLINFO *GetScrollInfoFromHwnd(HWND hwnd, int fnBar) return &sb->scrollInfo;
}
else
- return NULL;
+ return nullptr;
}
//
// Initialize the cool scrollbars for a window by subclassing it
@@ -161,14 +161,14 @@ BOOL WINAPI InitializeCoolSB(HWND hwnd) DWORD dwCurStyle;
//BOOL fDisabled;
- if (pEnableScrollBar == 0)
+ if (pEnableScrollBar == nullptr)
pEnableScrollBar = EnableScrollBar;
GetClientRect(hwnd, &rect);
//if we have already initialized Cool Scrollbars for this window,
//then stop the user from doing it again
- if (GetScrollWndFromHwnd(hwnd) != 0) {
+ if (GetScrollWndFromHwnd(hwnd) != nullptr) {
return FALSE;
}
@@ -254,7 +254,7 @@ BOOL WINAPI InitializeCoolSB(HWND hwnd) UNREFERENCED_PARAMETER(ice);
UNREFERENCED_PARAMETER(ti);
- sw->hwndToolTip = 0;
+ sw->hwndToolTip = nullptr;
#endif
@@ -385,7 +385,7 @@ int WINAPI CoolSB_SetScrollInfo(HWND hwnd, int fnBar, LPSCROLLINFO lpsi, BOOL fR }
SCROLLBAR *sbar = GetScrollBarFromHwnd(hwnd, fnBar);
- if (sbar == NULL)
+ if (sbar == nullptr)
return 0;
if ((lpsi->fMask & SIF_DISABLENOSCROLL) || (sbar->fScrollFlags & CSBS_THUMBALWAYS)) {
@@ -497,7 +497,7 @@ BOOL WINAPI CoolSB_ShowScrollBar(HWND hwnd, int wBar, BOOL fShow) //if (s
//SetWindowLongPtr(hwnd, GWL_STYLE, style);
- SetWindowPos(hwnd, 0, 0, 0, 0, 0,
+ SetWindowPos(hwnd, nullptr, 0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
SWP_NOACTIVATE | SWP_FRAMECHANGED);
|