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

Unified Diff: webrtc/modules/desktop_capture/win/dxgi_output_duplicator.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/win/dxgi_output_duplicator.cc
diff --git a/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc b/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc
index 21453b28ef5fd3999c9e3fffd3d4153b2a24d4d9..acb9c9df0fd3cc2c4561fcffb833429f2b2c50b0 100644
--- a/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc
+++ b/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc
@@ -69,7 +69,8 @@ DxgiOutputDuplicator::DxgiOutputDuplicator(const D3dDevice& device,
desktop_rect_(RECTToDesktopRect(desc.DesktopCoordinates)) {
RTC_DCHECK(output_);
RTC_DCHECK(!desktop_rect_.is_empty());
- RTC_DCHECK(desktop_rect_.width() > 0 && desktop_rect_.height() > 0);
+ RTC_DCHECK_GT(desktop_rect_.width(), 0);
+ RTC_DCHECK_GT(desktop_rect_.height(), 0);
}
DxgiOutputDuplicator::DxgiOutputDuplicator(DxgiOutputDuplicator&& other) =
@@ -385,7 +386,8 @@ int64_t DxgiOutputDuplicator::num_frames_captured() const {
void DxgiOutputDuplicator::TranslateRect(const DesktopVector& position) {
desktop_rect_.Translate(position);
- RTC_DCHECK(desktop_rect_.left() >= 0 && desktop_rect_.top() >= 0);
+ RTC_DCHECK_GE(desktop_rect_.left(), 0);
+ RTC_DCHECK_GE(desktop_rect_.top(), 0);
}
} // namespace webrtc
« no previous file with comments | « webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.cc ('k') | webrtc/modules/desktop_capture/win/dxgi_texture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698