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

Unified Diff: dbus/file_descriptor.cc

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 | « dbus/file_descriptor.h ('k') | net/base/file_stream_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus/file_descriptor.cc
diff --git a/dbus/file_descriptor.cc b/dbus/file_descriptor.cc
index c740f28062244b83ddd8e0727f771a6f8b4ad050..b690881749f8fb10bf3e01ab8d9f12a7b59ab998 100644
--- a/dbus/file_descriptor.cc
+++ b/dbus/file_descriptor.cc
@@ -21,9 +21,8 @@ void CHROME_DBUS_EXPORT FileDescriptor::Deleter::operator()(
FROM_HERE, base::Bind(&base::DeletePointer<FileDescriptor>, fd), false);
}
-FileDescriptor::FileDescriptor(RValue other)
- : value_(-1), owner_(false), valid_(false) {
- Swap(other.object);
+FileDescriptor::FileDescriptor(FileDescriptor&& other) : FileDescriptor() {
+ Swap(&other);
}
FileDescriptor::~FileDescriptor() {
@@ -31,8 +30,8 @@ FileDescriptor::~FileDescriptor() {
base::File auto_closer(value_);
}
-FileDescriptor& FileDescriptor::operator=(RValue other) {
- Swap(other.object);
+FileDescriptor& FileDescriptor::operator=(FileDescriptor&& other) {
+ Swap(&other);
return *this;
}
« no previous file with comments | « dbus/file_descriptor.h ('k') | net/base/file_stream_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698