From 84fbf9ee380ba107d8ba851dcd721b764d396d99 Mon Sep 17 00:00:00 2001 From: zijiehe Date: Thu, 20 Oct 2016 17:00:37 -0700 Subject: [PATCH] SUCCEEDED macro is misused SUCCEEDED macro is designed for HRESULT instead of BOOL. This change exposes my lack of knowledge of native Windows APIs. :( BUG=https://bugs.chromium.org/p/chromium/issues/detail?id=647067 Review-Url: https://codereview.webrtc.org/2440563003 Cr-Commit-Position: refs/heads/master@{#14716} --- webrtc/modules/desktop_capture/screen_drawer_win.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webrtc/modules/desktop_capture/screen_drawer_win.cc b/webrtc/modules/desktop_capture/screen_drawer_win.cc index 0b66991647..1bc591b9c7 100644 --- a/webrtc/modules/desktop_capture/screen_drawer_win.cc +++ b/webrtc/modules/desktop_capture/screen_drawer_win.cc @@ -174,8 +174,8 @@ void ScreenDrawerWin::DrawDot(DesktopVector vect, RgbaColor color) { } void ScreenDrawerWin::BringToFront() { - if (SUCCEEDED(SetWindowPos( - window_, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE))) { + if (SetWindowPos(window_, HWND_TOPMOST, 0, 0, 0, 0, + SWP_NOMOVE | SWP_NOSIZE) != FALSE) { return; }