diff options
author | kwiberg <kwiberg@webrtc.org> | 2015-12-17 03:04:15 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-17 11:04:24 +0000 |
commit | 0eb15ed7b806125774bd13fb214aeb403e2c6857 (patch) | |
tree | cfceaf6b8fa1fac35bbc17171994f49543f22abe /talk/app/webrtc/peerconnection_unittest.cc | |
parent | e376f0f2dfcbe46274dd79807a56715aea956fbd (diff) | |
download | webrtc-0eb15ed7b806125774bd13fb214aeb403e2c6857.tar.gz |
Don't call the Pass methods of rtc::Buffer, rtc::scoped_ptr, and rtc::ScopedVector
We can now use std::move instead!
This CL leaves the Pass methods in place; a follow-up CL will add deprecation annotations to them.
Review URL: https://codereview.webrtc.org/1460043002
Cr-Commit-Position: refs/heads/master@{#11064}
Diffstat (limited to 'talk/app/webrtc/peerconnection_unittest.cc')
-rw-r--r-- | talk/app/webrtc/peerconnection_unittest.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/talk/app/webrtc/peerconnection_unittest.cc b/talk/app/webrtc/peerconnection_unittest.cc index 55e4da86fb..49f450025a 100644 --- a/talk/app/webrtc/peerconnection_unittest.cc +++ b/talk/app/webrtc/peerconnection_unittest.cc @@ -30,6 +30,7 @@ #include <algorithm> #include <list> #include <map> +#include <utility> #include <vector> #include "talk/app/webrtc/dtmfsender.h" @@ -151,7 +152,7 @@ class PeerConnectionTestClient : public webrtc::PeerConnectionObserver, const PeerConnectionFactory::Options* options, rtc::scoped_ptr<webrtc::DtlsIdentityStoreInterface> dtls_identity_store) { PeerConnectionTestClient* client(new PeerConnectionTestClient(id)); - if (!client->Init(constraints, options, dtls_identity_store.Pass())) { + if (!client->Init(constraints, options, std::move(dtls_identity_store))) { delete client; return nullptr; } @@ -167,7 +168,7 @@ class PeerConnectionTestClient : public webrtc::PeerConnectionObserver, : nullptr); return CreateClientWithDtlsIdentityStore(id, constraints, options, - dtls_identity_store.Pass()); + std::move(dtls_identity_store)); } ~PeerConnectionTestClient() { @@ -761,7 +762,7 @@ class PeerConnectionTestClient : public webrtc::PeerConnectionObserver, peer_connection_factory_->SetOptions(*options); } peer_connection_ = CreatePeerConnection( - allocator_factory_.get(), constraints, dtls_identity_store.Pass()); + allocator_factory_.get(), constraints, std::move(dtls_identity_store)); return peer_connection_.get() != nullptr; } @@ -776,7 +777,8 @@ class PeerConnectionTestClient : public webrtc::PeerConnectionObserver, ice_servers.push_back(ice_server); return peer_connection_factory_->CreatePeerConnection( - ice_servers, constraints, factory, dtls_identity_store.Pass(), this); + ice_servers, constraints, factory, std::move(dtls_identity_store), + this); } void HandleIncomingOffer(const std::string& msg) { @@ -1129,7 +1131,8 @@ class P2PTestConductor : public testing::Test { // Make sure the new client is using a different certificate. return PeerConnectionTestClient::CreateClientWithDtlsIdentityStore( - "New Peer: ", &setup_constraints, nullptr, dtls_identity_store.Pass()); + "New Peer: ", &setup_constraints, nullptr, + std::move(dtls_identity_store)); } void SendRtpData(webrtc::DataChannelInterface* dc, const std::string& data) { |