diff options
| author | 2020-07-28 18:44:23 -0700 | |
|---|---|---|
| committer | 2020-07-29 08:52:34 -0700 | |
| commit | 02686ea0e580ce7cad65360d4f7b18c99d871d9c (patch) | |
| tree | 3f18d0b25f9b8cd2e7da6054d29e52665f214549 | |
| parent | 0360dae827430d4fd6476cf22e0a75d732e032bb (diff) | |
Add default move assignment opperators to ScopedAResource types
The types that inherit from ScopedAResource can use the move assignment
opperator that is already defined for ScopedAResource.
Test: Builds
Change-Id: I449b259f04619d563556aa9a946e304326b79ee0
| -rw-r--r-- | libs/binder/ndk/include_cpp/android/binder_auto_utils.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/binder/ndk/include_cpp/android/binder_auto_utils.h b/libs/binder/ndk/include_cpp/android/binder_auto_utils.h index 2b61cf18c2..f59bb75cc1 100644 --- a/libs/binder/ndk/include_cpp/android/binder_auto_utils.h +++ b/libs/binder/ndk/include_cpp/android/binder_auto_utils.h @@ -189,6 +189,7 @@ class ScopedAParcel : public impl::ScopedAResource<AParcel*, void, AParcel_delet explicit ScopedAParcel(AParcel* a = nullptr) : ScopedAResource(a) {} ~ScopedAParcel() {} ScopedAParcel(ScopedAParcel&&) = default; + ScopedAParcel& operator=(ScopedAParcel&&) = default; }; /** @@ -273,6 +274,7 @@ class ScopedAIBinder_DeathRecipient : ScopedAResource(a) {} ~ScopedAIBinder_DeathRecipient() {} ScopedAIBinder_DeathRecipient(ScopedAIBinder_DeathRecipient&&) = default; + ScopedAIBinder_DeathRecipient& operator=(ScopedAIBinder_DeathRecipient&&) = default; }; /** @@ -287,6 +289,7 @@ class ScopedAIBinder_Weak explicit ScopedAIBinder_Weak(AIBinder_Weak* a = nullptr) : ScopedAResource(a) {} ~ScopedAIBinder_Weak() {} ScopedAIBinder_Weak(ScopedAIBinder_Weak&&) = default; + ScopedAIBinder_Weak& operator=(ScopedAIBinder_Weak&&) = default; /** * See AIBinder_Weak_promote. @@ -305,6 +308,7 @@ class ScopedFileDescriptor : public impl::ScopedAResource<int, int, close, -1> { explicit ScopedFileDescriptor(int a = -1) : ScopedAResource(a) {} ~ScopedFileDescriptor() {} ScopedFileDescriptor(ScopedFileDescriptor&&) = default; + ScopedFileDescriptor& operator=(ScopedFileDescriptor&&) = default; }; } // namespace ndk |