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

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

Issue 1712513002: Replace scoped_ptr with unique_ptr in webrtc/common_audio/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase 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
« no previous file with comments | « webrtc/common_audio/resampler/push_sinc_resampler.h ('k') | webrtc/common_audio/resampler/sinc_resampler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_audio/resampler/push_sinc_resampler_unittest.cc
diff --git a/webrtc/common_audio/resampler/push_sinc_resampler_unittest.cc b/webrtc/common_audio/resampler/push_sinc_resampler_unittest.cc
index 17e3dba1e23eb5c36a914fd1220a66996bdf59a4..afb0963c3fd10f000d67dcec34e3648c46a43487 100644
--- a/webrtc/common_audio/resampler/push_sinc_resampler_unittest.cc
+++ b/webrtc/common_audio/resampler/push_sinc_resampler_unittest.cc
@@ -10,10 +10,10 @@
#include <cmath>
#include <cstring>
+#include <memory>
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/common_audio/include/audio_util.h"
#include "webrtc/common_audio/resampler/push_sinc_resampler.h"
#include "webrtc/common_audio/resampler/sinusoidal_linear_chirp_source.h"
@@ -71,10 +71,10 @@ void PushSincResamplerTest::ResampleBenchmarkTest(bool int_format) {
// Source for data to be resampled.
ZeroSource resampler_source;
- rtc::scoped_ptr<float[]> resampled_destination(new float[output_samples]);
- rtc::scoped_ptr<float[]> source(new float[input_samples]);
- rtc::scoped_ptr<int16_t[]> source_int(new int16_t[input_samples]);
- rtc::scoped_ptr<int16_t[]> destination_int(new int16_t[output_samples]);
+ std::unique_ptr<float[]> resampled_destination(new float[output_samples]);
+ std::unique_ptr<float[]> source(new float[input_samples]);
+ std::unique_ptr<int16_t[]> source_int(new int16_t[input_samples]);
+ std::unique_ptr<int16_t[]> destination_int(new int16_t[output_samples]);
resampler_source.Run(input_samples, source.get());
for (size_t i = 0; i < input_samples; ++i) {
@@ -153,11 +153,11 @@ void PushSincResamplerTest::ResampleTest(bool int_format) {
// TODO(dalecurtis): If we switch to AVX/SSE optimization, we'll need to
// allocate these on 32-byte boundaries and ensure they're sized % 32 bytes.
- rtc::scoped_ptr<float[]> resampled_destination(new float[output_samples]);
- rtc::scoped_ptr<float[]> pure_destination(new float[output_samples]);
- rtc::scoped_ptr<float[]> source(new float[input_samples]);
- rtc::scoped_ptr<int16_t[]> source_int(new int16_t[input_block_size]);
- rtc::scoped_ptr<int16_t[]> destination_int(new int16_t[output_block_size]);
+ std::unique_ptr<float[]> resampled_destination(new float[output_samples]);
+ std::unique_ptr<float[]> pure_destination(new float[output_samples]);
+ std::unique_ptr<float[]> source(new float[input_samples]);
+ std::unique_ptr<int16_t[]> source_int(new int16_t[input_block_size]);
+ std::unique_ptr<int16_t[]> destination_int(new int16_t[output_block_size]);
// The sinc resampler has an implicit delay of approximately half the kernel
// size at the input sample rate. By moving to a push model, this delay
« no previous file with comments | « webrtc/common_audio/resampler/push_sinc_resampler.h ('k') | webrtc/common_audio/resampler/sinc_resampler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698