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) { |