aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/src/utils/exclusive_ownership_pointer.h
diff options
context:
space:
mode:
Diffstat (limited to 'native/jni/src/utils/exclusive_ownership_pointer.h')
-rw-r--r--native/jni/src/utils/exclusive_ownership_pointer.h14
1 files changed, 2 insertions, 12 deletions
diff --git a/native/jni/src/utils/exclusive_ownership_pointer.h b/native/jni/src/utils/exclusive_ownership_pointer.h
index 617b34968..081802e8b 100644
--- a/native/jni/src/utils/exclusive_ownership_pointer.h
+++ b/native/jni/src/utils/exclusive_ownership_pointer.h
@@ -39,25 +39,15 @@ class ExclusiveOwnershipPointer {
deletePointersIfHavingOwnership();
}
- // Move the ownership.
- AK_FORCE_INLINE ExclusiveOwnershipPointer<T> &operator=(
- const ExclusiveOwnershipPointer<T> &pointer) {
- // Delete pointers when this is an owner of another pointer.
- deletePointersIfHavingOwnership();
- mPointer = pointer.mPointer;
- mSharedOwnerPtr = pointer.mSharedOwnerPtr;
- transferOwnership(pointer);
- return *this;
- }
-
AK_FORCE_INLINE T *get() const {
return mPointer;
}
private:
- // This class allows to copy and assign and ensures only one instance has the ownership of the
+ // This class allows to copy and ensures only one instance has the ownership of the
// managed pointer.
DISALLOW_DEFAULT_CONSTRUCTOR(ExclusiveOwnershipPointer);
+ DISALLOW_ASSIGNMENT_OPERATOR(ExclusiveOwnershipPointer);
void transferOwnership(const ExclusiveOwnershipPointer<T> *const src) {
if (*mSharedOwnerPtr != src) {