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

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

Issue 2988153003: Replace CHECK(x && y) with two separate CHECK() calls (Closed)
Patch Set: fix mistakes Created 3 years, 4 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/desktop_frame_generator.cc
diff --git a/webrtc/modules/desktop_capture/desktop_frame_generator.cc b/webrtc/modules/desktop_capture/desktop_frame_generator.cc
index 30a08f2708c42a66ad1b9b21651ba2c7e2abbe58..7bb58974ff571ca3f14a22c73a46250e5c5e7924 100644
--- a/webrtc/modules/desktop_capture/desktop_frame_generator.cc
+++ b/webrtc/modules/desktop_capture/desktop_frame_generator.cc
@@ -64,8 +64,8 @@ void SetUpdatedRegion(DesktopFrame* frame,
void PaintRect(DesktopFrame* frame, DesktopRect rect, RgbaColor rgba_color) {
static_assert(DesktopFrame::kBytesPerPixel == sizeof(uint32_t),
"kBytesPerPixel should be 4.");
- RTC_DCHECK(frame->size().width() >= rect.right() &&
- frame->size().height() >= rect.bottom());
+ RTC_DCHECK_GE(frame->size().width(), rect.right());
+ RTC_DCHECK_GE(frame->size().height(), rect.bottom());
uint32_t color = rgba_color.ToUInt32();
uint8_t* row = frame->GetFrameDataAtPos(rect.top_left());
for (int i = 0; i < rect.height(); i++) {

Powered by Google App Engine
This is Rietveld 408576698