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

Unified Diff: webrtc/modules/audio_processing/transient/moving_moments.cc

Issue 1698843003: Replace scoped_ptr with unique_ptr in webrtc/modules/audio_processing/transient/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: compile fix Created 4 years, 10 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/moving_moments.cc
diff --git a/webrtc/modules/audio_processing/transient/moving_moments.cc b/webrtc/modules/audio_processing/transient/moving_moments.cc
index aa475220180ed44e6ba2f06a16cfb983638bcd86..bc0b6f0b9193a7f09cb73d1e343ed0a6b8d3b782 100644
--- a/webrtc/modules/audio_processing/transient/moving_moments.cc
+++ b/webrtc/modules/audio_processing/transient/moving_moments.cc
@@ -13,7 +13,7 @@
#include <math.h>
#include <string.h>
-#include "webrtc/base/scoped_ptr.h"
+#include "webrtc/base/checks.h"
namespace webrtc {
@@ -22,7 +22,7 @@ MovingMoments::MovingMoments(size_t length)
queue_(),
sum_(0.0),
sum_of_squares_(0.0) {
- assert(length > 0);
+ RTC_DCHECK_GT(length, 0u);
for (size_t i = 0; i < length; ++i) {
queue_.push(0.0);
}
@@ -32,7 +32,7 @@ MovingMoments::~MovingMoments() {}
void MovingMoments::CalculateMoments(const float* in, size_t in_length,
float* first, float* second) {
- assert(in && in_length > 0 && first && second);
+ RTC_DCHECK(in && in_length > 0 && first && second);
for (size_t i = 0; i < in_length; ++i) {
const float old_value = queue_.front();

Powered by Google App Engine
This is Rietveld 408576698