refactor: replace remaining NULL
with nullptr
(#40053)
refactor: use nullptr everywhere
This commit is contained in:
parent
9d0e6d09f0
commit
04b2ba84cd
34 changed files with 98 additions and 93 deletions
|
@ -206,7 +206,7 @@ bool IsScreenReaderActive() {
|
|||
} // namespace
|
||||
|
||||
std::set<NativeWindowViews*> NativeWindowViews::forwarding_windows_;
|
||||
HHOOK NativeWindowViews::mouse_hook_ = NULL;
|
||||
HHOOK NativeWindowViews::mouse_hook_ = nullptr;
|
||||
|
||||
void NativeWindowViews::Maximize() {
|
||||
// Only use Maximize() when window is NOT transparent style
|
||||
|
@ -509,7 +509,7 @@ void NativeWindowViews::SetForwardMouseMessages(bool forward) {
|
|||
reinterpret_cast<DWORD_PTR>(this));
|
||||
|
||||
if (!mouse_hook_) {
|
||||
mouse_hook_ = SetWindowsHookEx(WH_MOUSE_LL, MouseHookProc, NULL, 0);
|
||||
mouse_hook_ = SetWindowsHookEx(WH_MOUSE_LL, MouseHookProc, nullptr, 0);
|
||||
}
|
||||
} else if (!forward && forwarding_mouse_messages_) {
|
||||
forwarding_mouse_messages_ = false;
|
||||
|
@ -519,7 +519,7 @@ void NativeWindowViews::SetForwardMouseMessages(bool forward) {
|
|||
|
||||
if (forwarding_windows_.empty()) {
|
||||
UnhookWindowsHookEx(mouse_hook_);
|
||||
mouse_hook_ = NULL;
|
||||
mouse_hook_ = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -557,7 +557,7 @@ LRESULT CALLBACK NativeWindowViews::MouseHookProc(int n_code,
|
|||
WPARAM w_param,
|
||||
LPARAM l_param) {
|
||||
if (n_code < 0) {
|
||||
return CallNextHookEx(NULL, n_code, w_param, l_param);
|
||||
return CallNextHookEx(nullptr, n_code, w_param, l_param);
|
||||
}
|
||||
|
||||
// Post a WM_MOUSEMOVE message for those windows whose client area contains
|
||||
|
@ -581,7 +581,7 @@ LRESULT CALLBACK NativeWindowViews::MouseHookProc(int n_code,
|
|||
}
|
||||
}
|
||||
|
||||
return CallNextHookEx(NULL, n_code, w_param, l_param);
|
||||
return CallNextHookEx(nullptr, n_code, w_param, l_param);
|
||||
}
|
||||
|
||||
} // namespace electron
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue