summaryrefslogtreecommitdiff
path: root/core/fxge
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge')
-rw-r--r--core/fxge/android/fx_android_imp.cpp3
-rw-r--r--core/fxge/ge/cfx_fontcache.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/core/fxge/android/fx_android_imp.cpp b/core/fxge/android/fx_android_imp.cpp
index b8e7c5b218..e4fdd1e131 100644
--- a/core/fxge/android/fx_android_imp.cpp
+++ b/core/fxge/android/fx_android_imp.cpp
@@ -11,6 +11,7 @@
#include "core/fxge/android/cfpf_skiadevicemodule.h"
#include "core/fxge/android/cfx_androidfontinfo.h"
+#include "third_party/base/ptr_util.h"
void CFX_GEModule::InitPlatform() {
CFPF_SkiaDeviceModule* pDeviceModule = CFPF_GetSkiaDeviceModule();
@@ -19,7 +20,7 @@ void CFX_GEModule::InitPlatform() {
CFPF_SkiaFontMgr* pFontMgr = pDeviceModule->GetFontMgr();
if (pFontMgr) {
- std::unique_ptr<CFX_AndroidFontInfo> pFontInfo(new CFX_AndroidFontInfo);
+ auto pFontInfo = pdfium::MakeUnique<CFX_AndroidFontInfo>();
pFontInfo->Init(pFontMgr);
m_pFontMgr->SetSystemFontInfo(std::move(pFontInfo));
}
diff --git a/core/fxge/ge/cfx_fontcache.cpp b/core/fxge/ge/cfx_fontcache.cpp
index 58cee06d42..1599c30b93 100644
--- a/core/fxge/ge/cfx_fontcache.cpp
+++ b/core/fxge/ge/cfx_fontcache.cpp
@@ -12,6 +12,7 @@
#include "core/fxge/cfx_facecache.h"
#include "core/fxge/fx_font.h"
#include "core/fxge/fx_freetype.h"
+#include "third_party/base/ptr_util.h"
CFX_FontCache::CountedFaceCache::CountedFaceCache() {}
@@ -35,7 +36,7 @@ CFX_FaceCache* CFX_FontCache::GetCachedFace(const CFX_Font* pFont) {
return counted_face_cache->m_Obj.get();
}
- std::unique_ptr<CountedFaceCache> counted_face_cache(new CountedFaceCache);
+ auto counted_face_cache = pdfium::MakeUnique<CountedFaceCache>();
counted_face_cache->m_nCount = 2;
CFX_FaceCache* face_cache = new CFX_FaceCache(bExternal ? nullptr : face);
counted_face_cache->m_Obj.reset(face_cache);