diff --git a/webrtc/base/buffer.h b/webrtc/base/buffer.h index e9c47ee84e..681348d910 100644 --- a/webrtc/base/buffer.h +++ b/webrtc/base/buffer.h @@ -18,7 +18,6 @@ #include "webrtc/base/array_view.h" #include "webrtc/base/checks.h" #include "webrtc/base/constructormagic.h" -#include "webrtc/base/deprecation.h" namespace rtc { @@ -229,15 +228,6 @@ class Buffer { RTC_DCHECK(IsConsistent()); } - // b.Pass() does the same thing as std::move(b). - // Deprecated; remove in March 2016 (bug 5373). - RTC_DEPRECATED Buffer&& Pass() { return DEPRECATED_Pass(); } - - Buffer&& DEPRECATED_Pass() { - RTC_DCHECK(IsConsistent()); - return std::move(*this); - } - // Resets the buffer to zero size without altering capacity. Works even if the // buffer has been moved from. void Clear() { diff --git a/webrtc/base/buffer_unittest.cc b/webrtc/base/buffer_unittest.cc index 80d26927a2..7c654477f3 100644 --- a/webrtc/base/buffer_unittest.cc +++ b/webrtc/base/buffer_unittest.cc @@ -138,7 +138,7 @@ TEST(BufferTest, TestEnsureCapacityLarger) { TEST(BufferTest, TestMoveConstruct) { Buffer buf1(kTestData, 3, 40); const uint8_t* data = buf1.data(); - Buffer buf2(buf1.DEPRECATED_Pass()); + Buffer buf2(std::move(buf1)); EXPECT_EQ(buf2.size(), 3u); EXPECT_EQ(buf2.capacity(), 40u); EXPECT_EQ(buf2.data(), data); @@ -152,7 +152,7 @@ TEST(BufferTest, TestMoveAssign) { Buffer buf1(kTestData, 3, 40); const uint8_t* data = buf1.data(); Buffer buf2(kTestData); - buf2 = buf1.DEPRECATED_Pass(); + buf2 = std::move(buf1); EXPECT_EQ(buf2.size(), 3u); EXPECT_EQ(buf2.capacity(), 40u); EXPECT_EQ(buf2.data(), data); diff --git a/webrtc/base/scoped_ptr.h b/webrtc/base/scoped_ptr.h index 955bcfeab4..b7e94989e5 100644 --- a/webrtc/base/scoped_ptr.h +++ b/webrtc/base/scoped_ptr.h @@ -91,7 +91,6 @@ #include #include "webrtc/base/constructormagic.h" -#include "webrtc/base/deprecation.h" #include "webrtc/base/template_util.h" #include "webrtc/typedefs.h" @@ -375,12 +374,6 @@ class scoped_ptr { scoped_ptr(const scoped_ptr& other) = delete; scoped_ptr& operator=(const scoped_ptr& other) = delete; - // Get an rvalue reference. (sp.Pass() does the same thing as std::move(sp).) - // Deprecated; remove in March 2016 (bug 5373). - RTC_DEPRECATED scoped_ptr&& Pass() { - return std::move(*this); - } - // Reset. Deletes the currently owned object, if any. // Then takes ownership of a new object, if given. void reset(element_type* p = nullptr) { impl_.reset(p); } @@ -511,12 +504,6 @@ class scoped_ptr { scoped_ptr(const scoped_ptr& other) = delete; scoped_ptr& operator=(const scoped_ptr& other) = delete; - // Get an rvalue reference. (sp.Pass() does the same thing as std::move(sp).) - // Deprecated; remove in March 2016 (bug 5373). - RTC_DEPRECATED scoped_ptr&& Pass() { - return std::move(*this); - } - // Reset. Deletes the currently owned array, if any. // Then takes ownership of a new object, if given. void reset(element_type* array = nullptr) { impl_.reset(array); } diff --git a/webrtc/system_wrappers/include/scoped_vector.h b/webrtc/system_wrappers/include/scoped_vector.h index 15c3380c8c..ba836d8106 100644 --- a/webrtc/system_wrappers/include/scoped_vector.h +++ b/webrtc/system_wrappers/include/scoped_vector.h @@ -16,7 +16,6 @@ #include #include "webrtc/base/checks.h" -#include "webrtc/base/deprecation.h" #include "webrtc/system_wrappers/include/stl_util.h" namespace webrtc { @@ -56,13 +55,6 @@ class ScopedVector { ScopedVector(const ScopedVector& other) = delete; ScopedVector& operator=(const ScopedVector& other) = delete; - // Get an rvalue reference. (sv.Pass() does the same thing as std::move(sv).) - // Deprecated; remove in March 2016 (bug 5373). - RTC_DEPRECATED ScopedVector&& Pass() { return DEPRECATED_Pass(); } - ScopedVector&& DEPRECATED_Pass() { - return std::move(*this); - } - reference operator[](size_t index) { return v_[index]; } const_reference operator[](size_t index) const { return v_[index]; } diff --git a/webrtc/system_wrappers/source/scoped_vector_unittest.cc b/webrtc/system_wrappers/source/scoped_vector_unittest.cc index 6e38f01f0b..d0275947dd 100644 --- a/webrtc/system_wrappers/source/scoped_vector_unittest.cc +++ b/webrtc/system_wrappers/source/scoped_vector_unittest.cc @@ -221,8 +221,7 @@ TEST(ScopedVectorTest, MoveConstruct) { EXPECT_FALSE(scoped_vector.empty()); EXPECT_TRUE(watcher.IsWatching(scoped_vector.back())); - ScopedVector scoped_vector_copy( - scoped_vector.DEPRECATED_Pass()); + ScopedVector scoped_vector_copy(std::move(scoped_vector)); EXPECT_TRUE(scoped_vector.empty()); EXPECT_FALSE(scoped_vector_copy.empty()); EXPECT_TRUE(watcher.IsWatching(scoped_vector_copy.back())); @@ -242,7 +241,7 @@ TEST(ScopedVectorTest, MoveAssign) { EXPECT_FALSE(scoped_vector.empty()); EXPECT_TRUE(watcher.IsWatching(scoped_vector.back())); - scoped_vector_assign = scoped_vector.DEPRECATED_Pass(); + scoped_vector_assign = std::move(scoped_vector); EXPECT_TRUE(scoped_vector.empty()); EXPECT_FALSE(scoped_vector_assign.empty()); EXPECT_TRUE(watcher.IsWatching(scoped_vector_assign.back())); @@ -274,12 +273,8 @@ class DeleteCounter { template class PassThru { public: - explicit PassThru(ScopedVector scoper) - : scoper_(scoper.DEPRECATED_Pass()) {} - - ScopedVector Run() { - return scoper_.DEPRECATED_Pass(); - } + explicit PassThru(ScopedVector scoper) : scoper_(std::move(scoper)) {} + ScopedVector Run() { return std::move(scoper_); } private: ScopedVector scoper_; @@ -290,7 +285,7 @@ TEST(ScopedVectorTest, Passed) { ScopedVector deleter_vector; deleter_vector.push_back(new DeleteCounter(&deletes)); EXPECT_EQ(0, deletes); - PassThru pass_thru(deleter_vector.DEPRECATED_Pass()); + PassThru pass_thru(std::move(deleter_vector)); EXPECT_EQ(0, deletes); ScopedVector result = pass_thru.Run(); EXPECT_EQ(0, deletes);