From 0bb1333a9eff1190ddd68f34c71d6a779c69dfef Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 30 Mar 2017 16:12:02 -0400 Subject: Add some calls to MakeUnique This CL replaces some new's with pdfium::MakeUnique. Change-Id: I50faf3ed55e7730b094c14a7989a9dd51cf33cbb Reviewed-on: https://pdfium-review.googlesource.com/3430 Commit-Queue: dsinclair Reviewed-by: Tom Sepez --- core/fxge/ge/cfx_fontcache.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/fxge/ge/cfx_fontcache.cpp') 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 counted_face_cache(new CountedFaceCache); + auto counted_face_cache = pdfium::MakeUnique(); counted_face_cache->m_nCount = 2; CFX_FaceCache* face_cache = new CFX_FaceCache(bExternal ? nullptr : face); counted_face_cache->m_Obj.reset(face_cache); -- cgit v1.2.3