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

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

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
« no previous file with comments | « webrtc/modules/audio_processing/test/test_utils.h ('k') | webrtc/modules/audio_processing/test/unpack.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/test/test_utils.cc
diff --git a/webrtc/modules/audio_processing/test/test_utils.cc b/webrtc/modules/audio_processing/test/test_utils.cc
index 0bd70126ae4acd4e4cbdefa2869ed6b8952a705f..0d50b0cbb5b46c9b8ba1bb6669ca8aefe8c6c82e 100644
--- a/webrtc/modules/audio_processing/test/test_utils.cc
+++ b/webrtc/modules/audio_processing/test/test_utils.cc
@@ -33,7 +33,7 @@ void RawFile::WriteSamples(const float* samples, size_t num_samples) {
fwrite(samples, sizeof(*samples), num_samples, file_handle_);
}
-ChannelBufferWavReader::ChannelBufferWavReader(rtc::scoped_ptr<WavReader> file)
+ChannelBufferWavReader::ChannelBufferWavReader(std::unique_ptr<WavReader> file)
: file_(std::move(file)) {}
bool ChannelBufferWavReader::Read(ChannelBuffer<float>* buffer) {
@@ -50,7 +50,7 @@ bool ChannelBufferWavReader::Read(ChannelBuffer<float>* buffer) {
return true;
}
-ChannelBufferWavWriter::ChannelBufferWavWriter(rtc::scoped_ptr<WavWriter> file)
+ChannelBufferWavWriter::ChannelBufferWavWriter(std::unique_ptr<WavWriter> file)
: file_(std::move(file)) {}
void ChannelBufferWavWriter::Write(const ChannelBuffer<float>& buffer) {
@@ -80,7 +80,7 @@ void WriteFloatData(const float* const* data,
WavWriter* wav_file,
RawFile* raw_file) {
size_t length = num_channels * samples_per_channel;
- rtc::scoped_ptr<float[]> buffer(new float[length]);
+ std::unique_ptr<float[]> buffer(new float[length]);
Interleave(data, samples_per_channel, num_channels, buffer.get());
if (raw_file) {
raw_file->WriteSamples(buffer.get(), length);
« no previous file with comments | « webrtc/modules/audio_processing/test/test_utils.h ('k') | webrtc/modules/audio_processing/test/unpack.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698