summaryrefslogtreecommitdiff
path: root/core/fxge/ge/cfx_fontcache.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-03-30 16:12:02 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-03-30 20:26:02 +0000
commit0bb1333a9eff1190ddd68f34c71d6a779c69dfef (patch)
tree5a46946c4852f147309e2b1389e6f42d6553abf7 /core/fxge/ge/cfx_fontcache.cpp
parent908c848202ef137e98d96f82a4eadfae551403b7 (diff)
downloadpdfium-0bb1333a9eff1190ddd68f34c71d6a779c69dfef.tar.xz
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 <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxge/ge/cfx_fontcache.cpp')
-rw-r--r--core/fxge/ge/cfx_fontcache.cpp3
1 files changed, 2 insertions, 1 deletions
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);