Slap deprecation notices on Pass methods
There's no reason not to use std::move instead now that we can use the C++11 standard library. BUG=webrtc:5373 Review URL: https://codereview.webrtc.org/1531013003 Cr-Commit-Position: refs/heads/master@{#11225}
This commit is contained in:
@ -15,6 +15,8 @@
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <utility> // std::swap (C++11 and later)
|
||||
|
||||
#include "webrtc/base/deprecation.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
|
||||
namespace rtc {
|
||||
@ -170,7 +172,9 @@ class Buffer {
|
||||
}
|
||||
|
||||
// b.Pass() does the same thing as std::move(b).
|
||||
Buffer&& Pass() {
|
||||
// Deprecated; remove in March 2016 (bug 5373).
|
||||
RTC_DEPRECATED Buffer&& Pass() { return DEPRECATED_Pass(); }
|
||||
Buffer&& DEPRECATED_Pass() {
|
||||
assert(IsConsistent());
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user