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:
@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user