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

Unified Diff: webrtc/modules/desktop_capture/screen_drawer_win.cc

Issue 2685783014: Replace NULL with nullptr in all C++ files. (Closed)
Patch Set: Fixing android. 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/modules/desktop_capture/screen_drawer_win.cc
diff --git a/webrtc/modules/desktop_capture/screen_drawer_win.cc b/webrtc/modules/desktop_capture/screen_drawer_win.cc
index 7b1a56f84a11bb797645561728eb75abc2cc97ab..354ec6a4bc8256c2beef61e8600e31921d0b87b0 100644
--- a/webrtc/modules/desktop_capture/screen_drawer_win.cc
+++ b/webrtc/modules/desktop_capture/screen_drawer_win.cc
@@ -33,8 +33,8 @@ class ScreenDrawerLockWin : public ScreenDrawerLock {
ScreenDrawerLockWin::ScreenDrawerLockWin() {
while (true) {
- mutex_ = CreateMutex(NULL, FALSE, kMutexName);
- if (GetLastError() != ERROR_ALREADY_EXISTS && mutex_ != NULL) {
+ mutex_ = CreateMutex(nullptr, FALSE, kMutexName);
+ if (GetLastError() != ERROR_ALREADY_EXISTS && mutex_ != nullptr) {
break;
} else {
if (mutex_) {
@@ -50,17 +50,18 @@ ScreenDrawerLockWin::~ScreenDrawerLockWin() {
}
DesktopRect GetScreenRect() {
- HDC hdc = GetDC(NULL);
+ HDC hdc = GetDC(nullptr);
DesktopRect rect = DesktopRect::MakeWH(GetDeviceCaps(hdc, HORZRES),
GetDeviceCaps(hdc, VERTRES));
- ReleaseDC(NULL, hdc);
+ ReleaseDC(nullptr, hdc);
return rect;
}
HWND CreateDrawerWindow(DesktopRect rect) {
- HWND hwnd = CreateWindowA(
- "STATIC", "DrawerWindow", WS_POPUPWINDOW | WS_VISIBLE, rect.left(),
- rect.top(), rect.width(), rect.height(), NULL, NULL, NULL, NULL);
+ HWND hwnd =
+ CreateWindowA("STATIC", "DrawerWindow", WS_POPUPWINDOW | WS_VISIBLE,
+ rect.left(), rect.top(), rect.width(), rect.height(),
+ nullptr, nullptr, nullptr, nullptr);
SetForegroundWindow(hwnd);
return hwnd;
}
@@ -115,7 +116,7 @@ ScreenDrawerWin::ScreenDrawerWin()
}
ScreenDrawerWin::~ScreenDrawerWin() {
- ReleaseDC(NULL, hdc_);
+ ReleaseDC(nullptr, hdc_);
DestroyWindow(window_);
// Unfortunately there is no EnableProcessWindowsGhosting() API.
}

Powered by Google App Engine
This is Rietveld 408576698