diff options
author | dcheng <dcheng@chromium.org> | 2015-12-01 04:09:52 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-01 12:10:42 +0000 |
commit | e1b0277c20198c31b8782f567634552243182d08 (patch) | |
tree | 75fde33e5410051ddff4de64bbdd9766d294ef25 /dbus/file_descriptor.cc | |
parent | 7f54a6c611e793e47712cd4a988a46b5fbbdfd07 (diff) | |
download | chromium_src-e1b0277c20198c31b8782f567634552243182d08.zip chromium_src-e1b0277c20198c31b8782f567634552243182d08.tar.gz chromium_src-e1b0277c20198c31b8782f567634552243182d08.tar.bz2 |
Remove old C++03 move emulation code.
Chrome allows the use of C++11 features now, so just use rvalue
references directly.
BUG=543901
Review URL: https://codereview.chromium.org/1407443002
Cr-Commit-Position: refs/heads/master@{#362394}
Diffstat (limited to 'dbus/file_descriptor.cc')
-rw-r--r-- | dbus/file_descriptor.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/dbus/file_descriptor.cc b/dbus/file_descriptor.cc index c740f28..b690881 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; } |