summaryrefslogtreecommitdiff
path: root/xfa/fgas
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 /xfa/fgas
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 'xfa/fgas')
-rw-r--r--xfa/fgas/font/cfgas_gefont.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/xfa/fgas/font/cfgas_gefont.cpp b/xfa/fgas/font/cfgas_gefont.cpp
index ab773698e7..b1bd769336 100644
--- a/xfa/fgas/font/cfgas_gefont.cpp
+++ b/xfa/fgas/font/cfgas_gefont.cpp
@@ -160,12 +160,11 @@ bool CFGAS_GEFont::InitFont() {
if (!m_pFont)
return false;
- if (!m_pFontEncoding) {
- m_pFontEncoding.reset(FX_CreateFontEncodingEx(m_pFont));
- if (!m_pFontEncoding)
- return false;
- }
- return true;
+ if (m_pFontEncoding)
+ return true;
+
+ m_pFontEncoding = FX_CreateFontEncodingEx(m_pFont, FXFM_ENCODING_NONE);
+ return !!m_pFontEncoding;
}
CFX_RetainPtr<CFGAS_GEFont> CFGAS_GEFont::Derive(uint32_t dwFontStyles,