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

Unified Diff: webrtc/modules/audio_coding/codecs/cng/webrtc_cng.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/audio_coding/codecs/cng/webrtc_cng.cc
diff --git a/webrtc/modules/audio_coding/codecs/cng/webrtc_cng.cc b/webrtc/modules/audio_coding/codecs/cng/webrtc_cng.cc
index 9461cd00b91161077d2c91bf862a57de6b883396..b891d8423d28bb3febe6121d9d7dd5ea5bc8a031 100644
--- a/webrtc/modules/audio_coding/codecs/cng/webrtc_cng.cc
+++ b/webrtc/modules/audio_coding/codecs/cng/webrtc_cng.cc
@@ -218,13 +218,15 @@ ComfortNoiseEncoder::ComfortNoiseEncoder(int fs, int interval, int quality)
enc_reflCoefs_{0},
enc_corrVector_{0},
enc_seed_(7777) /* For debugging only. */ {
- RTC_CHECK(quality <= WEBRTC_CNG_MAX_LPC_ORDER && quality > 0);
+ RTC_CHECK_GT(quality, 0);
+ RTC_CHECK_LE(quality, WEBRTC_CNG_MAX_LPC_ORDER);
/* Needed to get the right function pointers in SPLIB. */
WebRtcSpl_Init();
}
void ComfortNoiseEncoder::Reset(int fs, int interval, int quality) {
- RTC_CHECK(quality <= WEBRTC_CNG_MAX_LPC_ORDER && quality > 0);
+ RTC_CHECK_GT(quality, 0);
+ RTC_CHECK_LE(quality, WEBRTC_CNG_MAX_LPC_ORDER);
enc_nrOfCoefs_ = quality;
enc_sampfreq_ = fs;
enc_interval_ = interval;
« no previous file with comments | « webrtc/logging/rtc_event_log/rtc_event_log_parser.cc ('k') | webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698