diff options
author | Shauren <shauren.trinity@gmail.com> | 2025-04-26 11:32:28 +0200 |
---|---|---|
committer | Ovahlord <dreadkiller@gmx.de> | 2025-05-11 11:41:45 +0200 |
commit | 57502fdc6e178492620ffa0d833c4ee3c9bd3ee3 (patch) | |
tree | 7b959b3a345448a97065c81bba0584e71db3e310 | |
parent | 6c6e147ba9b02d2adbf425f8f8b1371c4151fc67 (diff) |
Core/Utils: Added nullptr_t assignment operator to unique_weak_ptr (alias for .reset())
(cherry picked from commit 9d86423d8c2607712152d6dbf5d4fe9690a83081)
-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; |