| Index: base/win/scoped_handle.h
|
| diff --git a/base/win/scoped_handle.h b/base/win/scoped_handle.h
|
| index d1eb1d688aeb5410c0cdf34ca45026f7fbd3a202..3e8a7484c137ab37ca2af5a4f3a7cf9304d1875f 100644
|
| --- a/base/win/scoped_handle.h
|
| +++ b/base/win/scoped_handle.h
|
| @@ -36,7 +36,7 @@ namespace win {
|
| // this explicitly is necessary because of bug 528394 and VC++ 2015.
|
| template <class Traits, class Verifier>
|
| class GenericScopedHandle {
|
| - MOVE_ONLY_TYPE_FOR_CPP_03(GenericScopedHandle, RValue)
|
| + MOVE_ONLY_TYPE_FOR_CPP_03(GenericScopedHandle)
|
|
|
| public:
|
| typedef typename Traits::Handle Handle;
|
| @@ -47,9 +47,9 @@ class GenericScopedHandle {
|
| Set(handle);
|
| }
|
|
|
| - // Move constructor for C++03 move emulation of this type.
|
| - GenericScopedHandle(RValue other) : handle_(Traits::NullHandle()) {
|
| - Set(other.object->Take());
|
| + GenericScopedHandle(GenericScopedHandle&& other)
|
| + : handle_(Traits::NullHandle()) {
|
| + Set(other.Take());
|
| }
|
|
|
| ~GenericScopedHandle() {
|
| @@ -60,11 +60,9 @@ class GenericScopedHandle {
|
| return Traits::IsHandleValid(handle_);
|
| }
|
|
|
| - // Move operator= for C++03 move emulation of this type.
|
| - GenericScopedHandle& operator=(RValue other) {
|
| - if (this != other.object) {
|
| - Set(other.object->Take());
|
| - }
|
| + GenericScopedHandle& operator=(GenericScopedHandle&& other) {
|
| + DCHECK_NE(this, &other);
|
| + Set(other.Take());
|
| return *this;
|
| }
|
|
|
|
|