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

Unified Diff: webrtc/modules/audio_processing/transient/wpd_node.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/transient/wpd_node.cc
diff --git a/webrtc/modules/audio_processing/transient/wpd_node.cc b/webrtc/modules/audio_processing/transient/wpd_node.cc
index ab476a0ebd913fef426e802b2322d4b53c11d872..a689827e9a0a36da17db0ad094dc8ae8539d8a13 100644
--- a/webrtc/modules/audio_processing/transient/wpd_node.cc
+++ b/webrtc/modules/audio_processing/transient/wpd_node.cc
@@ -10,10 +10,10 @@
#include "webrtc/modules/audio_processing/transient/wpd_node.h"
-#include <assert.h>
#include <math.h>
#include <string.h>
+#include "webrtc/base/checks.h"
#include "webrtc/common_audio/fir_filter.h"
#include "webrtc/modules/audio_processing/transient/dyadic_decimator.h"
@@ -29,7 +29,9 @@ WPDNode::WPDNode(size_t length,
filter_(FIRFilter::Create(coefficients,
coefficients_length,
2 * length + 1)) {
- assert(length > 0 && coefficients && coefficients_length > 0);
+ RTC_DCHECK_GT(length, 0u);
+ RTC_DCHECK(coefficients);
+ RTC_DCHECK_GT(coefficients_length, 0u);
memset(data_.get(), 0.f, (2 * length + 1) * sizeof(data_[0]));
}
« no previous file with comments | « webrtc/modules/audio_processing/transient/transient_detector.cc ('k') | webrtc/modules/audio_processing/transient/wpd_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698