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

Unified Diff: webrtc/modules/audio_processing/transient/wpd_tree.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_tree.cc
diff --git a/webrtc/modules/audio_processing/transient/wpd_tree.cc b/webrtc/modules/audio_processing/transient/wpd_tree.cc
index 28cbb046ac698f7e4e1058b10254c5660e161916..fece6863fc4dc67525aa84533dfc575a4772a8fa 100644
--- a/webrtc/modules/audio_processing/transient/wpd_tree.cc
+++ b/webrtc/modules/audio_processing/transient/wpd_tree.cc
@@ -10,10 +10,10 @@
#include "webrtc/modules/audio_processing/transient/wpd_tree.h"
-#include <assert.h>
#include <math.h>
#include <string.h>
+#include "webrtc/base/checks.h"
#include "webrtc/modules/audio_processing/transient/dyadic_decimator.h"
#include "webrtc/modules/audio_processing/transient/wpd_node.h"
@@ -25,10 +25,10 @@ WPDTree::WPDTree(size_t data_length, const float* high_pass_coefficients,
: data_length_(data_length),
levels_(levels),
num_nodes_((1 << (levels + 1)) - 1) {
- assert(data_length > (static_cast<size_t>(1) << levels) &&
- high_pass_coefficients &&
- low_pass_coefficients &&
- levels > 0);
+ RTC_DCHECK_GT(data_length, (static_cast<size_t>(1) << levels));
+ RTC_DCHECK(high_pass_coefficients);
+ RTC_DCHECK(low_pass_coefficients);
+ RTC_DCHECK_GT(levels, 0);
// Size is 1 more, so we can use the array as 1-based. nodes_[0] is never
// allocated.
nodes_.reset(new std::unique_ptr<WPDNode>[num_nodes_ + 1]);
« no previous file with comments | « webrtc/modules/audio_processing/transient/wpd_node.cc ('k') | webrtc/modules/audio_processing/utility/delay_estimator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698