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

Unified Diff: base/process/process_posix.cc

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/process/process_posix.cc
diff --git a/base/process/process_posix.cc b/base/process/process_posix.cc
index 72e49faefca970303b91ecc66f24d3b79af27caf..d37a785700e32b0bccd12e7ef68dd19727c44c7f 100644
--- a/base/process/process_posix.cc
+++ b/base/process/process_posix.cc
@@ -216,16 +216,14 @@ Process::Process(ProcessHandle handle) : process_(handle) {
Process::~Process() {
}
-Process::Process(RValue other)
- : process_(other.object->process_) {
- other.object->Close();
+Process::Process(Process&& other) : process_(other.process_) {
+ other.Close();
}
-Process& Process::operator=(RValue other) {
- if (this != other.object) {
- process_ = other.object->process_;
- other.object->Close();
- }
+Process& Process::operator=(Process&& other) {
+ DCHECK_NE(this, &other);
+ process_ = other.process_;
+ other.Close();
return *this;
}

Powered by Google App Engine
This is Rietveld 408576698