aboutsummaryrefslogtreecommitdiff
path: root/src/common/Utilities/UniqueTrackablePtr.h
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2025-04-26 11:32:28 +0200
committerShauren <shauren.trinity@gmail.com>2025-04-26 11:32:28 +0200
commit9d86423d8c2607712152d6dbf5d4fe9690a83081 (patch)
tree0e5544be6936b85ac0e754a956aa1c2e2020b1e0 /src/common/Utilities/UniqueTrackablePtr.h
parentf9bf082be962d45de79f936d625f644253e9b810 (diff)
Core/Utils: Added nullptr_t assignment operator to unique_weak_ptr (alias for .reset())
Diffstat (limited to 'src/common/Utilities/UniqueTrackablePtr.h')
-rw-r--r--src/common/Utilities/UniqueTrackablePtr.h6
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;