aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2015-10-18 03:48:52 +0200
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2015-10-18 03:48:52 +0200
commitac91c29637218676d39aa20996ef6af7d2533aa7 (patch)
tree8e28c81f74f4994e1bc9943dae2635e3e9647aed
parenta6c45fb491b26a33184157d6c3a8652a8c61bd5a (diff)
downloadexternal_skia-master.zip
external_skia-master.tar.gz
external_skia-master.tar.bz2
add operator->() for SkAutoTDeleteHEADmaster
Change-Id: Ia9eefa6b7fa8bea028f972407913a3a61b1caafe
-rw-r--r--include/core/SkTemplates.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/core/SkTemplates.h b/include/core/SkTemplates.h
index 03f0892..50aa1e1 100644
--- a/include/core/SkTemplates.h
+++ b/include/core/SkTemplates.h
@@ -61,6 +61,7 @@ public:
~SkAutoTDelete() { if (fDeleteWhenDone) delete fObj; }
T* get() const { return fObj; }
+ T* operator->() const { SkASSERT(fObj); return fObj; }
void free() { delete fObj; fObj = NULL; }
T* detach() { T* obj = fObj; fObj = NULL; return obj; }