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:
kwiberg
2016-01-12 07:24:19 -08:00
committed by Commit bot
parent d20e651327
commit 36220ae24f
5 changed files with 29 additions and 11 deletions

View File

@ -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);
}