diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-05-01 11:39:33 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-05-01 19:09:28 +0000 |
commit | a0a69233cafa0ec22fd6c776851e3ee069ca66bf (patch) | |
tree | d19383094f925441de83f554c9e591f5807ea2d7 /core/fxge/ge/cfx_fontcache.cpp | |
parent | b8e00f24780335cdd068565f39d2874c81e799b9 (diff) | |
download | pdfium-a0a69233cafa0ec22fd6c776851e3ee069ca66bf.tar.xz |
Remove more |new|s, part 5
Many of these are already unique_ptrs.
Change-Id: I3695d4ff5a8f7483ad994ac7657897fd55069cd5
Reviewed-on: https://pdfium-review.googlesource.com/4690
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxge/ge/cfx_fontcache.cpp')
-rw-r--r-- | core/fxge/ge/cfx_fontcache.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/fxge/ge/cfx_fontcache.cpp b/core/fxge/ge/cfx_fontcache.cpp index 1599c30b93..5ccac8cfbc 100644 --- a/core/fxge/ge/cfx_fontcache.cpp +++ b/core/fxge/ge/cfx_fontcache.cpp @@ -38,8 +38,10 @@ CFX_FaceCache* CFX_FontCache::GetCachedFace(const CFX_Font* pFont) { 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); + auto new_cache = + pdfium::MakeUnique<CFX_FaceCache>(bExternal ? nullptr : face); + CFX_FaceCache* face_cache = new_cache.get(); + counted_face_cache->m_Obj = std::move(new_cache); map[face] = std::move(counted_face_cache); return face_cache; } |