diff options
author | Shauren <shauren.trinity@gmail.com> | 2025-04-26 11:32:28 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2025-04-26 11:32:28 +0200 |
commit | 9d86423d8c2607712152d6dbf5d4fe9690a83081 (patch) | |
tree | 0e5544be6936b85ac0e754a956aa1c2e2020b1e0 | |
parent | f9bf082be962d45de79f936d625f644253e9b810 (diff) |
Core/Utils: Added nullptr_t assignment operator to unique_weak_ptr (alias for .reset())
-rw-r--r-- | src/common/Utilities/UniqueTrackablePtr.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/Utilities/UniqueTrackablePtr.h b/src/common/Utilities/UniqueTrackablePtr.h index 7b1d9c236db..6c90dfd2752 100644 --- a/src/common/Utilities/UniqueTrackablePtr.h +++ b/src/common/Utilities/UniqueTrackablePtr.h @@ -198,6 +198,12 @@ public: ~unique_weak_ptr() = default; + unique_weak_ptr& operator=(std::nullptr_t) noexcept + { + _ptr.reset(); + return *this; + } + void swap(unique_weak_ptr& other) noexcept { using std::swap; |