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

Unified Diff: base/win/scoped_handle.h

Issue 11078014: Fix move.h's to use a concrete RValue carrier object rather than hacking a RValue&. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix error. Created 8 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
« no previous file with comments | « base/move.h ('k') | chrome/browser/usb/usb_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/scoped_handle.h
diff --git a/base/win/scoped_handle.h b/base/win/scoped_handle.h
index 62734b631c54e43a1d5a9938c065ca42fd7bd8e4..b5d9b5c4db3dc38f49726b7d4205f7af9ae7d647 100644
--- a/base/win/scoped_handle.h
+++ b/base/win/scoped_handle.h
@@ -49,8 +49,8 @@ class GenericScopedHandle {
}
// Move constructor for C++03 move emulation of this type.
- GenericScopedHandle(RValue& other) : handle_(Traits::NullHandle()) {
- Set(other.Take());
+ GenericScopedHandle(RValue other) : handle_(Traits::NullHandle()) {
+ Set(other.object->Take());
}
~GenericScopedHandle() {
@@ -62,9 +62,9 @@ class GenericScopedHandle {
}
// Move operator= for C++03 move emulation of this type.
- GenericScopedHandle& operator=(RValue& other) {
- if (this != &other) {
- Set(other.Take());
+ GenericScopedHandle& operator=(RValue other) {
+ if (this != other.object) {
+ Set(other.object->Take());
}
return *this;
}
« no previous file with comments | « base/move.h ('k') | chrome/browser/usb/usb_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698