From 24508dff1636d80be01497e30fccd21533fc0bde Mon Sep 17 00:00:00 2001 From: thestig Date: Fri, 27 May 2016 15:14:20 -0700 Subject: Clean up some Android/Windows code. Review-Url: https://codereview.chromium.org/2004313007 --- core/fxge/apple/fx_mac_imp.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'core/fxge/apple/fx_mac_imp.cpp') 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::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(pInfo); } + void CFX_GEModule::InitPlatform() { m_pPlatformData = new CApplePlatform; m_pFontMgr->SetSystemFontInfo(IFX_SystemFontInfo::CreateDefault(nullptr)); -- cgit v1.2.3