Index: webrtc/system_wrappers/include/scoped_vector.h |
diff --git a/webrtc/system_wrappers/include/scoped_vector.h b/webrtc/system_wrappers/include/scoped_vector.h |
index 7336d98a86de996ce4a27577b0a7a678c10798a7..284f437259e9776577ab78d6de03b5b2c39bcf4b 100644 |
--- a/webrtc/system_wrappers/include/scoped_vector.h |
+++ b/webrtc/system_wrappers/include/scoped_vector.h |
@@ -43,9 +43,7 @@ class ScopedVector { |
~ScopedVector() { clear(); } |
// Move construction and assignment. |
- ScopedVector(ScopedVector&& other) { |
- *this = static_cast<ScopedVector&&>(other); |
- } |
+ ScopedVector(ScopedVector&& other) { *this = std::move(other); } |
ScopedVector& operator=(ScopedVector&& other) { |
std::swap(v_, other.v_); // The arguments are std::vectors, so std::swap |
// is the one that we want. |
@@ -58,7 +56,7 @@ class ScopedVector { |
ScopedVector& operator=(const ScopedVector& other) = delete; |
// Get an rvalue reference. (sv.Pass() does the same thing as std::move(sv).) |
- ScopedVector&& Pass() { return static_cast<ScopedVector&&>(*this); } |
+ ScopedVector&& Pass() { return std::move(*this); } |
reference operator[](size_t index) { return v_[index]; } |
const_reference operator[](size_t index) const { return v_[index]; } |