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

Unified Diff: remoting/codec/audio_encoder_opus_unittest.cc

Issue 1545723002: Use std::move() instead of .Pass() in remoting/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass_host
Patch Set: 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
« no previous file with comments | « remoting/codec/audio_encoder_opus.cc ('k') | remoting/codec/audio_encoder_verbatim.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/codec/audio_encoder_opus_unittest.cc
diff --git a/remoting/codec/audio_encoder_opus_unittest.cc b/remoting/codec/audio_encoder_opus_unittest.cc
index db731eb28fad59aab286ecb1919d6e2e757ad4a6..b67e28ab3efbfb5ddcc9f3211ee868055a8e409b 100644
--- a/remoting/codec/audio_encoder_opus_unittest.cc
+++ b/remoting/codec/audio_encoder_opus_unittest.cc
@@ -4,11 +4,14 @@
// MSVC++ requires this to get M_PI.
#define _USE_MATH_DEFINES
+
+#include "remoting/codec/audio_encoder_opus.h"
+
#include <math.h>
#include <stddef.h>
#include <stdint.h>
-#include "remoting/codec/audio_encoder_opus.h"
+#include <utility>
#include "base/logging.h"
#include "remoting/codec/audio_decoder_opus.h"
@@ -82,7 +85,7 @@ class OpusAudioEncoderTest : public testing::Test {
packet->set_sampling_rate(rate);
packet->set_bytes_per_sample(AudioPacket::BYTES_PER_SAMPLE_2);
packet->set_channels(AudioPacket::CHANNELS_STEREO);
- return packet.Pass();
+ return packet;
}
// Decoded data is normally shifted in phase relative to the original signal.
@@ -139,9 +142,10 @@ class OpusAudioEncoderTest : public testing::Test {
scoped_ptr<AudioPacket> source_packet =
CreatePacket(packet_size, rate, frequency_hz, pos);
scoped_ptr<AudioPacket> encoded =
- encoder_->Encode(source_packet.Pass());
+ encoder_->Encode(std::move(source_packet));
if (encoded.get()) {
- scoped_ptr<AudioPacket> decoded = decoder_->Decode(encoded.Pass());
+ scoped_ptr<AudioPacket> decoded =
+ decoder_->Decode(std::move(encoded));
EXPECT_EQ(kDefaultSamplingRate, decoded->sampling_rate());
for (int i = 0; i < decoded->data_size(); ++i) {
const int16_t* data =
« no previous file with comments | « remoting/codec/audio_encoder_opus.cc ('k') | remoting/codec/audio_encoder_verbatim.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698