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

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: std::move and reflow Created 5 years, 1 month 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
« no previous file with comments | « base/files/file.cc ('k') | base/move.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/scoped_vector.h
diff --git a/base/memory/scoped_vector.h b/base/memory/scoped_vector.h
index 250947fda32c9f13c68589c36facd40457b98269..5bfd94e319337ac8c1039f242862aa0b49887c85 100644
--- a/base/memory/scoped_vector.h
+++ b/base/memory/scoped_vector.h
@@ -20,7 +20,7 @@
// we have support for moveable types inside containers).
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;
@@ -39,10 +39,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;
}
« no previous file with comments | « base/files/file.cc ('k') | base/move.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698