From 2863f082f2524ebae9e69f382b50065189912b47 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Wed, 13 Mar 2013 21:28:44 +0000 Subject: [PATCH] have reset() return its argument as a convenience git-svn-id: http://skia.googlecode.com/svn/trunk@8141 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/core/SkRefCnt.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h index 0330133675..66fc9dba68 100644 --- a/include/core/SkRefCnt.h +++ b/include/core/SkRefCnt.h @@ -164,9 +164,10 @@ public: T* get() const { return fObj; } - void reset(T* obj) { + T* reset(T* obj) { SkSafeUnref(fObj); fObj = obj; + return obj; } void swap(SkAutoTUnref* other) {