diff options
Diffstat (limited to 'source/core/slang-smart-pointer.h')
| -rw-r--r-- | source/core/slang-smart-pointer.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/core/slang-smart-pointer.h b/source/core/slang-smart-pointer.h index 45083c1eb..75c4398a5 100644 --- a/source/core/slang-smart-pointer.h +++ b/source/core/slang-smart-pointer.h @@ -236,6 +236,13 @@ namespace Slang return rs; } + void swapWith(RefPtr<T>& rhs) + { + auto rhsPtr = rhs.pointer; + rhs.pointer = pointer; + pointer = rhsPtr; + } + SLANG_FORCE_INLINE void setNull() { releaseReference(pointer); |
