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

Unified Diff: src/core/SkAdvancedTypefaceMetrics.h

Issue 1813843002: Revert of free -> reset (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 424e5f3f51470ba4c380624ff61baf19d7a2585e..92655d21b23dd1d4d08d4d1244563021785b62d9 100644
--- a/src/core/SkAdvancedTypefaceMetrics.h
+++ b/src/core/SkAdvancedTypefaceMetrics.h
@@ -28,12 +28,13 @@
T* get() const { return fPtr; }
T* operator->() const { return fPtr; }
- void reset(T* ptr = nullptr) {
+ void reset(T* ptr) {
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