Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Unified Diff: webrtc/base/win32window.cc

Issue 2718663005: Replace NULL with nullptr or null in webrtc/base/. (Closed)
Patch Set: Manually fixing a few things. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/base/win32window.cc
diff --git a/webrtc/base/win32window.cc b/webrtc/base/win32window.cc
index 9abbc86807a63835165b819f0e6689b5e5b80815..ca1d04c1d39b746386de419603fdc31e304b882d 100644
--- a/webrtc/base/win32window.cc
+++ b/webrtc/base/win32window.cc
@@ -19,14 +19,13 @@ namespace rtc {
///////////////////////////////////////////////////////////////////////////////
static const wchar_t kWindowBaseClassName[] = L"WindowBaseClass";
-HINSTANCE Win32Window::instance_ = NULL;
+HINSTANCE Win32Window::instance_ = nullptr;
ATOM Win32Window::window_class_ = 0;
-Win32Window::Win32Window() : wnd_(NULL) {
-}
+Win32Window::Win32Window() : wnd_(nullptr) {}
Win32Window::~Win32Window() {
- RTC_DCHECK(NULL == wnd_);
+ RTC_DCHECK(nullptr == wnd_);
}
bool Win32Window::Create(HWND parent, const wchar_t* title, DWORD style,
@@ -58,9 +57,9 @@ bool Win32Window::Create(HWND parent, const wchar_t* title, DWORD style,
return false;
}
}
- wnd_ = ::CreateWindowEx(exstyle, kWindowBaseClassName, title, style,
- x, y, cx, cy, parent, NULL, instance_, this);
- return (NULL != wnd_);
+ wnd_ = ::CreateWindowEx(exstyle, kWindowBaseClassName, title, style, x, y, cx,
+ cy, parent, nullptr, instance_, this);
+ return (nullptr != wnd_);
}
void Win32Window::Destroy() {
@@ -108,8 +107,8 @@ LRESULT Win32Window::WndProc(HWND hwnd, UINT uMsg,
}
}
if (WM_NCDESTROY == uMsg) {
- ::SetWindowLongPtr(hwnd, GWLP_USERDATA, NULL);
- that->wnd_ = NULL;
+ ::SetWindowLongPtr(hwnd, GWLP_USERDATA, nullptr);
tommi 2017/02/26 17:23:45 the name SetWindowLongPtr() is misleading unfortun
+ that->wnd_ = nullptr;
that->OnNcDestroy();
}
if (handled) {

Powered by Google App Engine
This is Rietveld 408576698