Index: include/core/SkRefCnt.h |
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h |
index 99df0c12567c4954c39243b6526e643d8605fe6f..b010faf7601af19576157d89a0a4161653d43603 100644 |
--- a/include/core/SkRefCnt.h |
+++ b/include/core/SkRefCnt.h |
@@ -237,11 +237,13 @@ public: |
private: |
T* fObj; |
}; |
+// Can't use the #define trick below to guard a bare SkAutoTUnref(...) because it's templated. :( |
class SkAutoUnref : public SkAutoTUnref<SkRefCnt> { |
public: |
SkAutoUnref(SkRefCnt* obj) : SkAutoTUnref<SkRefCnt>(obj) {} |
}; |
+#define SkAutoUnref(...) SK_REQUIRE_LOCAL_VAR(SkAutoUnref) |
class SkAutoRef : SkNoncopyable { |
public: |
@@ -250,6 +252,7 @@ public: |
private: |
SkRefCnt* fObj; |
}; |
+#define SkAutoRef(...) SK_REQUIRE_LOCAL_VAR(SkAutoRef) |
/** Wrapper class for SkRefCnt pointers. This manages ref/unref of a pointer to |
a SkRefCnt (or subclass) object. |