summaryrefslogtreecommitdiff
path: root/core/fxge/apple
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-05-27 15:14:20 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-27 15:14:20 -0700
commit24508dff1636d80be01497e30fccd21533fc0bde (patch)
tree4ae25af19a52e3221d95a505bda42817e11ac3f0 /core/fxge/apple
parentbbff41927ecce2ff93668aa615307f548ca896eb (diff)
downloadpdfium-24508dff1636d80be01497e30fccd21533fc0bde.tar.xz
Clean up some Android/Windows code.
Review-Url: https://codereview.chromium.org/2004313007
Diffstat (limited to 'core/fxge/apple')
-rw-r--r--core/fxge/apple/fx_mac_imp.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/core/fxge/apple/fx_mac_imp.cpp b/core/fxge/apple/fx_mac_imp.cpp
index 82b5078565..16dd4aef66 100644
--- a/core/fxge/apple/fx_mac_imp.cpp
+++ b/core/fxge/apple/fx_mac_imp.cpp
@@ -95,13 +95,16 @@ void* CFX_MacFontInfo::MapFont(int weight,
return NULL;
}
-IFX_SystemFontInfo* IFX_SystemFontInfo::CreateDefault(const char** pUnused) {
- CFX_MacFontInfo* pInfo = new CFX_MacFontInfo;
+
+std::unique_ptr<IFX_SystemFontInfo> IFX_SystemFontInfo::CreateDefault(
+ const char** pUnused) {
+ CFX_MacFontInfo* pInfo(new CFX_MacFontInfo);
pInfo->AddPath("~/Library/Fonts");
pInfo->AddPath("/Library/Fonts");
pInfo->AddPath("/System/Library/Fonts");
- return pInfo;
+ return std::unique_ptr<CFX_MacFontInfo>(pInfo);
}
+
void CFX_GEModule::InitPlatform() {
m_pPlatformData = new CApplePlatform;
m_pFontMgr->SetSystemFontInfo(IFX_SystemFontInfo::CreateDefault(nullptr));