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

Unified Diff: webrtc/api/videocapturertracksource.cc

Issue 2620303003: Replace ASSERT by RTC_DCHECK in all non-test code. (Closed)
Patch Set: Address final nits. Created 3 years, 11 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
« no previous file with comments | « webrtc/api/rtpsender.cc ('k') | webrtc/api/webrtcsdp.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/videocapturertracksource.cc
diff --git a/webrtc/api/videocapturertracksource.cc b/webrtc/api/videocapturertracksource.cc
index 1bf4bea1d0d779ec93eff06e55b73f1ebd998572..0d6d46d60904370093df30bfa2eb691d62047422 100644
--- a/webrtc/api/videocapturertracksource.cc
+++ b/webrtc/api/videocapturertracksource.cc
@@ -16,6 +16,7 @@
#include "webrtc/api/mediaconstraintsinterface.h"
#include "webrtc/base/arraysize.h"
+#include "webrtc/base/checks.h"
using cricket::CaptureState;
using webrtc::MediaConstraintsInterface;
@@ -50,7 +51,7 @@ MediaSourceInterface::SourceState GetReadyState(cricket::CaptureState state) {
case cricket::CS_STOPPED:
return MediaSourceInterface::kEnded;
default:
- ASSERT(false && "GetReadyState unknown state");
+ RTC_NOTREACHED() << "GetReadyState unknown state";
}
return MediaSourceInterface::kEnded;
}
@@ -101,7 +102,7 @@ bool NewFormatWithConstraints(
const cricket::VideoFormat& format_in,
bool mandatory,
cricket::VideoFormat* format_out) {
- ASSERT(format_out != NULL);
+ RTC_DCHECK(format_out != NULL);
*format_out = format_in;
if (constraint.key == MediaConstraintsInterface::kMinWidth) {
@@ -215,7 +216,7 @@ std::vector<cricket::VideoFormat> FilterFormats(
// default and still meets the contraints.
const cricket::VideoFormat& GetBestCaptureFormat(
const std::vector<cricket::VideoFormat>& formats) {
- ASSERT(formats.size() > 0);
+ RTC_DCHECK(formats.size() > 0);
int default_area = kDefaultFormat.width * kDefaultFormat.height;
« no previous file with comments | « webrtc/api/rtpsender.cc ('k') | webrtc/api/webrtcsdp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698