Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Unified Diff: base/memory/scoped_vector.h

Issue 1407443002: Remove old C++03 move emulation code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/memory/scoped_vector.h
diff --git a/base/memory/scoped_vector.h b/base/memory/scoped_vector.h
index e1e5c722a4fbe2e6d9f6b902640246b3209cb41c..088df0683056a6973c82db914b2cf5a87136cce6 100644
--- a/base/memory/scoped_vector.h
+++ b/base/memory/scoped_vector.h
@@ -17,7 +17,7 @@
// destructor.
template <class T>
class ScopedVector {
- MOVE_ONLY_TYPE_FOR_CPP_03(ScopedVector, RValue)
+ MOVE_ONLY_TYPE_FOR_CPP_03(ScopedVector)
public:
typedef typename std::vector<T*>::allocator_type allocator_type;
@@ -36,10 +36,10 @@ class ScopedVector {
ScopedVector() {}
~ScopedVector() { clear(); }
- ScopedVector(RValue other) { swap(*other.object); }
+ ScopedVector(ScopedVector&& other) { swap(other); }
- ScopedVector& operator=(RValue rhs) {
- swap(*rhs.object);
+ ScopedVector& operator=(ScopedVector&& rhs) {
+ swap(rhs);
return *this;
}

Powered by Google App Engine
This is Rietveld 408576698