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

Unified Diff: webrtc/common_audio/fir_filter.cc

Issue 2535643002: Replace some asserts with DCHECKs (Closed)
Patch Set: Don't use the enum hack Created 4 years, 1 month 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 | « no previous file | webrtc/common_audio/fir_filter_neon.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_audio/fir_filter.cc
diff --git a/webrtc/common_audio/fir_filter.cc b/webrtc/common_audio/fir_filter.cc
index ed1f1bbfb81439350a93b08f04dc37ee0d76705d..d0a2d2f3ee68d5f60b1ef85727aa52d3ca21d35e 100644
--- a/webrtc/common_audio/fir_filter.cc
+++ b/webrtc/common_audio/fir_filter.cc
@@ -10,11 +10,11 @@
#include "webrtc/common_audio/fir_filter.h"
-#include <assert.h>
#include <string.h>
#include <memory>
+#include "webrtc/base/checks.h"
#include "webrtc/common_audio/fir_filter_neon.h"
#include "webrtc/common_audio/fir_filter_sse.h"
#include "webrtc/system_wrappers/include/cpu_features_wrapper.h"
@@ -39,7 +39,7 @@ FIRFilter* FIRFilter::Create(const float* coefficients,
size_t coefficients_length,
size_t max_input_length) {
if (!coefficients || coefficients_length <= 0 || max_input_length <= 0) {
- assert(false);
+ RTC_NOTREACHED();
return NULL;
}
@@ -80,7 +80,7 @@ FIRFilterC::FIRFilterC(const float* coefficients, size_t coefficients_length)
}
void FIRFilterC::Filter(const float* in, size_t length, float* out) {
- assert(length > 0);
+ RTC_DCHECK_GT(length, 0);
// Convolves the input signal |in| with the filter kernel |coefficients_|
// taking into account the previous state.
« no previous file with comments | « no previous file | webrtc/common_audio/fir_filter_neon.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698