diff options
Diffstat (limited to 'include/core/SkRefCnt.h')
-rw-r--r-- | include/core/SkRefCnt.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h index f527ebe0af..3a0f8be383 100644 --- a/include/core/SkRefCnt.h +++ b/include/core/SkRefCnt.h @@ -159,6 +159,12 @@ public: fObj = obj; } + void swap(SkAutoTUnref* other) { + T* tmp = fObj; + fObj = other->fObj; + other->fObj = tmp; + } + /** * Return the hosted object (which may be null), transferring ownership. * The reference count is not modified, and the internal ptr is set to NULL |