Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: include/core/SkTemplates.h

Issue 506963002: SkAutoTDelete::operator T*() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/WArrayTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkTemplates.h
diff --git a/include/core/SkTemplates.h b/include/core/SkTemplates.h
index 5d3fa2d10cd2371c7dcebf2b45552e8922412884..aa9bfd5e13e8f75a8e48e24e0b49d431f66339fd 100644
--- a/include/core/SkTemplates.h
+++ b/include/core/SkTemplates.h
@@ -115,6 +115,7 @@ public:
~SkAutoTDelete() { SkDELETE(fObj); }
T* get() const { return fObj; }
+ operator T*() { return fObj; }
T& operator*() const { SkASSERT(fObj); return *fObj; }
T* operator->() const { SkASSERT(fObj); return fObj; }
« no previous file with comments | « no previous file | tests/WArrayTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698