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

Unified Diff: webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.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/win/screen_capturer_win_magnifier.cc
diff --git a/webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.cc b/webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.cc
index 96348ca49455bc5f1b0d1ab4b7bf75488f0bffce..f29e6d09dbf7b31cffe70df5db7b4f8e6dc5c9fb 100644
--- a/webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.cc
+++ b/webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.cc
@@ -52,7 +52,7 @@ ScreenCapturerWinMagnifier::~ScreenCapturerWinMagnifier() {
FreeLibrary(mag_lib_handle_);
if (desktop_dc_)
- ReleaseDC(NULL, desktop_dc_);
+ ReleaseDC(nullptr, desktop_dc_);
}
void ScreenCapturerWinMagnifier::Start(Callback* callback) {
@@ -91,11 +91,11 @@ void ScreenCapturerWinMagnifier::CaptureFrame() {
// Switch to the desktop receiving user input if different from the current
// one.
std::unique_ptr<Desktop> input_desktop(Desktop::GetInputDesktop());
- if (input_desktop.get() != NULL && !desktop_.IsSame(*input_desktop)) {
+ if (input_desktop.get() != nullptr && !desktop_.IsSame(*input_desktop)) {
// Release GDI resources otherwise SetThreadDesktop will fail.
if (desktop_dc_) {
- ReleaseDC(NULL, desktop_dc_);
- desktop_dc_ = NULL;
+ ReleaseDC(nullptr, desktop_dc_);
+ desktop_dc_ = nullptr;
}
// If SetThreadDesktop() fails, the thread is still assigned a desktop.
// So we can continue capture screen bits, just from the wrong desktop.
@@ -157,8 +157,8 @@ bool ScreenCapturerWinMagnifier::CaptureImage(const DesktopRect& rect) {
// Set the magnifier control to cover the captured rect. The content of the
// magnifier control will be the captured image.
- BOOL result = SetWindowPos(magnifier_window_, NULL, rect.left(), rect.top(),
- rect.width(), rect.height(), 0);
+ BOOL result = SetWindowPos(magnifier_window_, nullptr, rect.left(),
+ rect.top(), rect.width(), rect.height(), 0);
if (!result) {
LOG_F(LS_WARNING) << "Failed to call SetWindowPos: " << GetLastError()
<< ". Rect = {" << rect.left() << ", " << rect.top()

Powered by Google App Engine
This is Rietveld 408576698