summaryrefslogtreecommitdiff
path: root/core/fxge/ge/cfx_facecache.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-01 11:39:33 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-01 19:09:28 +0000
commita0a69233cafa0ec22fd6c776851e3ee069ca66bf (patch)
treed19383094f925441de83f554c9e591f5807ea2d7 /core/fxge/ge/cfx_facecache.cpp
parentb8e00f24780335cdd068565f39d2874c81e799b9 (diff)
downloadpdfium-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_facecache.cpp')
-rw-r--r--core/fxge/ge/cfx_facecache.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/fxge/ge/cfx_facecache.cpp b/core/fxge/ge/cfx_facecache.cpp
index 0969cdf10c..5ad7bdd99a 100644
--- a/core/fxge/ge/cfx_facecache.cpp
+++ b/core/fxge/ge/cfx_facecache.cpp
@@ -396,8 +396,9 @@ CFX_GlyphBitmap* CFX_FaceCache::LookUpGlyphBitmap(
CFX_SizeGlyphCache* pSizeCache;
auto it = m_SizeMap.find(FaceGlyphsKey);
if (it == m_SizeMap.end()) {
- pSizeCache = new CFX_SizeGlyphCache;
- m_SizeMap[FaceGlyphsKey] = std::unique_ptr<CFX_SizeGlyphCache>(pSizeCache);
+ auto pNewCache = pdfium::MakeUnique<CFX_SizeGlyphCache>();
+ pSizeCache = pNewCache.get();
+ m_SizeMap[FaceGlyphsKey] = std::move(pNewCache);
} else {
pSizeCache = it->second.get();
}