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

Unified Diff: webrtc/common_audio/resampler/push_resampler.cc

Issue 2384693002: Test RTC_DCHECK_IS_ON instead of checking DCHECK_ALWAYS_ON everywhere (Closed)
Patch Set: !!! 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
« no previous file with comments | « webrtc/base/thread_checker_unittest.cc ('k') | webrtc/media/sctp/sctpdataengine.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_audio/resampler/push_resampler.cc
diff --git a/webrtc/common_audio/resampler/push_resampler.cc b/webrtc/common_audio/resampler/push_resampler.cc
index b26774de2400554ce1ac33c7cfd28094d8e606a6..9f329c4cb99634426216b8862a6d794844b8bb43 100644
--- a/webrtc/common_audio/resampler/push_resampler.cc
+++ b/webrtc/common_audio/resampler/push_resampler.cc
@@ -29,7 +29,7 @@ void CheckValidInitParams(int src_sample_rate_hz, int dst_sample_rate_hz,
size_t num_channels) {
// The below checks are temporarily disabled on WEBRTC_WIN due to problems
// with clang debug builds.
-#if !defined(WEBRTC_WIN) && defined(__clang__) && !defined(NDEBUG)
+#if !defined(WEBRTC_WIN) && defined(__clang__)
RTC_DCHECK_GT(src_sample_rate_hz, 0);
RTC_DCHECK_GT(dst_sample_rate_hz, 0);
RTC_DCHECK_GT(num_channels, 0u);
@@ -46,11 +46,11 @@ void CheckExpectedBufferSizes(size_t src_length,
// with clang debug builds.
// TODO(tommi): Re-enable when we've figured out what the problem is.
// http://crbug.com/615050
-#if !defined(WEBRTC_WIN) && defined(__clang__) && !defined(NDEBUG)
+#if !defined(WEBRTC_WIN) && defined(__clang__)
const size_t src_size_10ms = src_sample_rate * num_channels / 100;
const size_t dst_size_10ms = dst_sample_rate * num_channels / 100;
- RTC_CHECK_EQ(src_length, src_size_10ms);
- RTC_CHECK_GE(dst_capacity, dst_size_10ms);
+ RTC_DCHECK_EQ(src_length, src_size_10ms);
+ RTC_DCHECK_GE(dst_capacity, dst_size_10ms);
#endif
}
}
« no previous file with comments | « webrtc/base/thread_checker_unittest.cc ('k') | webrtc/media/sctp/sctpdataengine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698