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

Unified Diff: base/memory/ref_counted.h

Issue 1479473002: base: Use std::move() instead of Pass() for real movable types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: basepass: missing-include 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/json/json_writer_unittest.cc ('k') | base/memory/ref_counted_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/ref_counted.h
diff --git a/base/memory/ref_counted.h b/base/memory/ref_counted.h
index 5f94b4c37ae2eb510176b585b30a9af20e216d32..26c65519664ee0eddb8cf7d2c8687232f8ec36f1 100644
--- a/base/memory/ref_counted.h
+++ b/base/memory/ref_counted.h
@@ -331,13 +331,13 @@ class scoped_refptr {
}
scoped_refptr<T>& operator=(scoped_refptr<T>&& r) {
- scoped_refptr<T>(r.Pass()).swap(*this);
+ scoped_refptr<T>(std::move(r)).swap(*this);
return *this;
}
template <typename U>
scoped_refptr<T>& operator=(scoped_refptr<U>&& r) {
- scoped_refptr<T>(r.Pass()).swap(*this);
+ scoped_refptr<T>(std::move(r)).swap(*this);
return *this;
}
« no previous file with comments | « base/json/json_writer_unittest.cc ('k') | base/memory/ref_counted_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698