From ac91c29637218676d39aa20996ef6af7d2533aa7 Mon Sep 17 00:00:00 2001 From: Wolfgang Wiedmeyer Date: Sun, 18 Oct 2015 03:48:52 +0200 Subject: add operator->() for SkAutoTDelete Change-Id: Ia9eefa6b7fa8bea028f972407913a3a61b1caafe --- include/core/SkTemplates.h | 1 + 1 file changed, 1 insertion(+) 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; } -- cgit v1.1