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

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

Issue 1460043002: Don't call the Pass methods of rtc::Buffer, rtc::scoped_ptr, and rtc::ScopedVector (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Restore the Pass methods Created 5 years 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/audio_file_processor.cc
diff --git a/webrtc/modules/audio_processing/test/audio_file_processor.cc b/webrtc/modules/audio_processing/test/audio_file_processor.cc
index ca244d550fed05248c5f650d93c09afb36dadc25..4c773566c4525f6f1da6c19c765c242c8954eac6 100644
--- a/webrtc/modules/audio_processing/test/audio_file_processor.cc
+++ b/webrtc/modules/audio_processing/test/audio_file_processor.cc
@@ -11,6 +11,7 @@
#include "webrtc/modules/audio_processing/test/audio_file_processor.h"
#include <algorithm>
+#include <utility>
#include "webrtc/base/checks.h"
#include "webrtc/modules/audio_processing/test/protobuf_utils.h"
@@ -43,13 +44,13 @@ ChannelBuffer<float> GetChannelBuffer(const WavFile& file) {
WavFileProcessor::WavFileProcessor(scoped_ptr<AudioProcessing> ap,
scoped_ptr<WavReader> in_file,
scoped_ptr<WavWriter> out_file)
- : ap_(ap.Pass()),
+ : ap_(std::move(ap)),
in_buf_(GetChannelBuffer(*in_file)),
out_buf_(GetChannelBuffer(*out_file)),
input_config_(GetStreamConfig(*in_file)),
output_config_(GetStreamConfig(*out_file)),
- buffer_reader_(in_file.Pass()),
- buffer_writer_(out_file.Pass()) {}
+ buffer_reader_(std::move(in_file)),
+ buffer_writer_(std::move(out_file)) {}
bool WavFileProcessor::ProcessChunk() {
if (!buffer_reader_.Read(&in_buf_)) {
@@ -68,11 +69,11 @@ bool WavFileProcessor::ProcessChunk() {
AecDumpFileProcessor::AecDumpFileProcessor(scoped_ptr<AudioProcessing> ap,
FILE* dump_file,
scoped_ptr<WavWriter> out_file)
- : ap_(ap.Pass()),
+ : ap_(std::move(ap)),
dump_file_(dump_file),
out_buf_(GetChannelBuffer(*out_file)),
output_config_(GetStreamConfig(*out_file)),
- buffer_writer_(out_file.Pass()) {
+ buffer_writer_(std::move(out_file)) {
RTC_CHECK(dump_file_) << "Could not open dump file for reading.";
}
« no previous file with comments | « webrtc/modules/audio_device/android/audio_track_jni.cc ('k') | webrtc/modules/audio_processing/test/audioproc_float.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698