aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Boehm <hboehm@google.com>2016-09-27 14:25:27 -0700
committerHans Boehm <hboehm@google.com>2016-09-27 14:43:01 -0700
commite9f90a21c05c630062ce790e32a4b21405c631bd (patch)
tree695c421aff93661994099926286e577ea1d4391a
parent0e90812b64239054c61b4a018d9ca559f8bb1658 (diff)
downloadskia-android-7.1.1_r17.tar.gz
Missing typename is a bug, apparently missed by treehugger. type T conflicts with an identically named template parameter in SkRefSet.h. Fixes a build break caused by ag/1461060 . Change-Id: Ie695e760574dc3c84871cd23d57eb7852405ebc5
-rw-r--r--include/core/SkRefCnt.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h
index 422770c86d..0be2562100 100644
--- a/include/core/SkRefCnt.h
+++ b/include/core/SkRefCnt.h
@@ -144,12 +144,14 @@ class SK_API SkRefCnt : public SkRefCntBase { };
#define SkRefCnt_SafeAssign(dst, src) \
do { \
- typedef std::remove_reference<decltype(dst)>::type T; \
- T old_dst = *const_cast<T volatile *>(&dst); \
+ typedef typename std::remove_reference<decltype(dst)>::type \
+ SkRefCntPtrT; \
+ SkRefCntPtrT old_dst = *const_cast<SkRefCntPtrT volatile *>(&dst); \
if (src) src->ref(); \
if (old_dst) old_dst->unref(); \
- if (old_dst != *const_cast<T volatile *>(&dst)) { \
- SkDebugf("Detected racing Skia calls at %s:%d\n", __FILE__, __LINE__); \
+ if (old_dst != *const_cast<SkRefCntPtrT volatile *>(&dst)) { \
+ SkDebugf("Detected racing Skia calls at %s:%d\n", \
+ __FILE__, __LINE__); \
} \
dst = src; \
} while (0)