Replace scoped_ptr with unique_ptr in webrtc/modules/audio_processing/test/
BUG=webrtc:5520
Review URL: https://codereview.webrtc.org/1694423002
Cr-Commit-Position: refs/heads/master@{#11653}
diff --git a/webrtc/modules/audio_processing/test/test_utils.h b/webrtc/modules/audio_processing/test/test_utils.h
index e23beb6..5de67cf 100644
--- a/webrtc/modules/audio_processing/test/test_utils.h
+++ b/webrtc/modules/audio_processing/test/test_utils.h
@@ -14,11 +14,11 @@
#include <math.h>
#include <iterator>
#include <limits>
+#include <memory>
#include <string>
#include <vector>
#include "webrtc/base/constructormagic.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/common_audio/channel_buffer.h"
#include "webrtc/common_audio/wav_file.h"
#include "webrtc/modules/audio_processing/include/audio_processing.h"
@@ -46,14 +46,14 @@
// Reads ChannelBuffers from a provided WavReader.
class ChannelBufferWavReader final {
public:
- explicit ChannelBufferWavReader(rtc::scoped_ptr<WavReader> file);
+ explicit ChannelBufferWavReader(std::unique_ptr<WavReader> file);
// Reads data from the file according to the |buffer| format. Returns false if
// a full buffer can't be read from the file.
bool Read(ChannelBuffer<float>* buffer);
private:
- rtc::scoped_ptr<WavReader> file_;
+ std::unique_ptr<WavReader> file_;
std::vector<float> interleaved_;
RTC_DISALLOW_COPY_AND_ASSIGN(ChannelBufferWavReader);
@@ -62,11 +62,11 @@
// Writes ChannelBuffers to a provided WavWriter.
class ChannelBufferWavWriter final {
public:
- explicit ChannelBufferWavWriter(rtc::scoped_ptr<WavWriter> file);
+ explicit ChannelBufferWavWriter(std::unique_ptr<WavWriter> file);
void Write(const ChannelBuffer<float>& buffer);
private:
- rtc::scoped_ptr<WavWriter> file_;
+ std::unique_ptr<WavWriter> file_;
std::vector<float> interleaved_;
RTC_DISALLOW_COPY_AND_ASSIGN(ChannelBufferWavWriter);
@@ -95,7 +95,7 @@
void SetContainerFormat(int sample_rate_hz,
size_t num_channels,
AudioFrame* frame,
- rtc::scoped_ptr<ChannelBuffer<T> >* cb) {
+ std::unique_ptr<ChannelBuffer<T> >* cb) {
SetFrameSampleRate(frame, sample_rate_hz);
frame->num_channels_ = num_channels;
cb->reset(new ChannelBuffer<T>(frame->samples_per_channel_, num_channels));