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

Unified Diff: src/ports/SkFontMgr_custom.cpp

Issue 1809733002: detach -> release (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: (C) 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/ports/SkFontMgr_android_parser.cpp ('k') | src/ports/SkFontMgr_fontconfig.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontMgr_custom.cpp
diff --git a/src/ports/SkFontMgr_custom.cpp b/src/ports/SkFontMgr_custom.cpp
index 7f3ce6b03208ef6759dae895522aab7f726bd2ba..158ba006d4f16ad3b0b1b9a94a006ee68fb2a59f 100644
--- a/src/ports/SkFontMgr_custom.cpp
+++ b/src/ports/SkFontMgr_custom.cpp
@@ -296,7 +296,7 @@ protected:
SkFontStyle style;
SkString name;
if (fScanner.scanFont(stream, ttcIndex, &name, &style, &isFixedPitch, nullptr)) {
- return new SkTypeface_Stream(style, isFixedPitch, false, name, stream.detach(),
+ return new SkTypeface_Stream(style, isFixedPitch, false, name, stream.release(),
ttcIndex);
} else {
return nullptr;
@@ -305,7 +305,7 @@ protected:
SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const override {
SkAutoTDelete<SkStreamAsset> stream(SkStream::NewFromFile(path));
- return stream.get() ? this->createFromStream(stream.detach(), ttcIndex) : nullptr;
+ return stream.get() ? this->createFromStream(stream.release(), ttcIndex) : nullptr;
}
SkTypeface* onLegacyCreateTypeface(const char familyName[], unsigned styleBits) const override {
@@ -489,7 +489,7 @@ private:
SkTypeface_Custom* tf =
new SkTypeface_Stream(style, isFixedPitch, true, // system-font (cannot delete)
- realname, stream.detach(), faceIndex);
+ realname, stream.release(), faceIndex);
SkFontStyleSet_Custom* addTo = find_family(*families, realname.c_str());
if (nullptr == addTo) {
« no previous file with comments | « src/ports/SkFontMgr_android_parser.cpp ('k') | src/ports/SkFontMgr_fontconfig.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698