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

Unified Diff: webrtc/modules/audio_processing/test/test_utils.h

Issue 1694423002: Replace scoped_ptr with unique_ptr in webrtc/modules/audio_processing/test/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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/test/test_utils.h
diff --git a/webrtc/modules/audio_processing/test/test_utils.h b/webrtc/modules/audio_processing/test/test_utils.h
index e23beb66f4e4522e4cfaf061c7dae5831c0427c7..5de67cf3b22c328e074738de4bc48a947ca635ec 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 @@ class RawFile final {
// 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 @@ class ChannelBufferWavReader final {
// 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 @@ template <typename T>
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));
« no previous file with comments | « webrtc/modules/audio_processing/test/protobuf_utils.cc ('k') | webrtc/modules/audio_processing/test/test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698