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

Unified Diff: include/core/SkTemplates.h

Issue 912053003: Fix append_fallback_font_families_for_locale. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Full test and address comments. Created 5 years, 10 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 | resources/android_fonts/v17/fallback_fonts-ja.xml » ('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 6ab44394d898c58cab23f270ae3edf4a0ee64905..c26e4422b5584260783fee63c7cf38fa09cf95db 100644
--- a/include/core/SkTemplates.h
+++ b/include/core/SkTemplates.h
@@ -107,6 +107,10 @@ template <typename T, int (*P)(T*)> class SkAutoTCallIProc : SkNoncopyable {
public:
SkAutoTCallIProc(T* obj): fObj(obj) {}
~SkAutoTCallIProc() { if (fObj) P(fObj); }
+
+ operator T*() const { return fObj; }
+ T* operator->() const { SkASSERT(fObj); return fObj; }
+
T* detach() { T* obj = fObj; fObj = NULL; return obj; }
private:
T* fObj;
« no previous file with comments | « no previous file | resources/android_fonts/v17/fallback_fonts-ja.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698