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

Unified Diff: src/core/SkAdvancedTypefaceMetrics.h

Issue 1811723002: free -> reset (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: zarro boogs found Created 4 years, 9 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 | « src/codec/SkRawCodec.cpp ('k') | src/core/SkAdvancedTypefaceMetrics.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkAdvancedTypefaceMetrics.h
diff --git a/src/core/SkAdvancedTypefaceMetrics.h b/src/core/SkAdvancedTypefaceMetrics.h
index 92655d21b23dd1d4d08d4d1244563021785b62d9..424e5f3f51470ba4c380624ff61baf19d7a2585e 100644
--- a/src/core/SkAdvancedTypefaceMetrics.h
+++ b/src/core/SkAdvancedTypefaceMetrics.h
@@ -28,13 +28,12 @@ public:
T* get() const { return fPtr; }
T* operator->() const { return fPtr; }
- void reset(T* ptr) {
+ void reset(T* ptr = nullptr) {
if (ptr != fPtr) {
delete fPtr;
fPtr = ptr;
}
}
- void free() { this->reset(nullptr); }
T* release() {
T* ptr = fPtr;
fPtr = nullptr;
« no previous file with comments | « src/codec/SkRawCodec.cpp ('k') | src/core/SkAdvancedTypefaceMetrics.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698