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

Unified Diff: webrtc/modules/audio_processing/agc/agc.cc

Issue 2320053003: webrtc/modules/audio_processing: Use RTC_DCHECK() instead of assert() (Closed)
Patch Set: rebase Created 4 years, 3 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/audio_processing/agc/agc.cc
diff --git a/webrtc/modules/audio_processing/agc/agc.cc b/webrtc/modules/audio_processing/agc/agc.cc
index 2bff7359f814070900ea260b1cada5e99712fa90..a6256cbe46ab4a5c30d04c8421c66583fa07fce6 100644
--- a/webrtc/modules/audio_processing/agc/agc.cc
+++ b/webrtc/modules/audio_processing/agc/agc.cc
@@ -39,7 +39,7 @@ Agc::Agc()
Agc::~Agc() {}
float Agc::AnalyzePreproc(const int16_t* audio, size_t length) {
- assert(length > 0);
+ RTC_DCHECK_GT(length, 0u);
size_t num_clipped = 0;
for (size_t i = 0; i < length; ++i) {
if (audio[i] == 32767 || audio[i] == -32768)
@@ -62,7 +62,7 @@ int Agc::Process(const int16_t* audio, size_t length, int sample_rate_hz) {
bool Agc::GetRmsErrorDb(int* error) {
if (!error) {
- assert(false);
+ RTC_NOTREACHED();
return false;
}
« no previous file with comments | « webrtc/modules/audio_processing/aecm/aecm_core_neon.cc ('k') | webrtc/modules/audio_processing/agc/agc_manager_direct.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698