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}
This commit is contained in:
kwiberg
2015-12-17 03:04:15 -08:00
committed by Commit bot
parent e376f0f2df
commit 0eb15ed7b8
46 changed files with 205 additions and 203 deletions

View File

@ -11,6 +11,7 @@
#include "webrtc/base/buffer.h"
#include <cassert>
#include <utility>
namespace rtc {
@ -22,7 +23,9 @@ Buffer::Buffer(const Buffer& buf) : Buffer(buf.data(), buf.size()) {
}
Buffer::Buffer(Buffer&& buf)
: size_(buf.size()), capacity_(buf.capacity()), data_(buf.data_.Pass()) {
: size_(buf.size()),
capacity_(buf.capacity()),
data_(std::move(buf.data_)) {
assert(IsConsistent());
buf.OnMovedFrom();
}