summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpvt_fontmap.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-23 16:18:28 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-24 01:28:39 +0000
commit033e565d8244953afe8eab3d0c7ee1ed9863c921 (patch)
tree410cbe152379180ff2fd3411b289be6fa31e3c82 /core/fpdfdoc/cpvt_fontmap.cpp
parent655c783b8077f18e17418a3aab9b5a07c8055049 (diff)
downloadpdfium-033e565d8244953afe8eab3d0c7ee1ed9863c921.tar.xz
Convert to CFX_UnownedPtr, part 5
Change-Id: Ibdb20fca7e4daae9d61286df4801ac02faf3b281 Reviewed-on: https://pdfium-review.googlesource.com/5831 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfdoc/cpvt_fontmap.cpp')
-rw-r--r--core/fpdfdoc/cpvt_fontmap.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/core/fpdfdoc/cpvt_fontmap.cpp b/core/fpdfdoc/cpvt_fontmap.cpp
index c6e1a85dae..0edabd1bc3 100644
--- a/core/fpdfdoc/cpvt_fontmap.cpp
+++ b/core/fpdfdoc/cpvt_fontmap.cpp
@@ -21,9 +21,7 @@ CPVT_FontMap::CPVT_FontMap(CPDF_Document* pDoc,
: m_pDocument(pDoc),
m_pResDict(pResDict),
m_pDefFont(pDefFont),
- m_sDefFontAlias(sDefFontAlias),
- m_pSysFont(nullptr),
- m_sSysFontAlias() {}
+ m_sDefFontAlias(sDefFontAlias) {}
CPVT_FontMap::~CPVT_FontMap() {}
@@ -49,13 +47,13 @@ CPDF_Font* CPVT_FontMap::GetAnnotSysPDFFont(CPDF_Document* pDoc,
CPDF_Font* CPVT_FontMap::GetPDFFont(int32_t nFontIndex) {
switch (nFontIndex) {
case 0:
- return m_pDefFont;
+ return m_pDefFont.Get();
case 1:
if (!m_pSysFont) {
- m_pSysFont =
- GetAnnotSysPDFFont(m_pDocument, m_pResDict, &m_sSysFontAlias);
+ m_pSysFont = GetAnnotSysPDFFont(m_pDocument.Get(), m_pResDict.Get(),
+ &m_sSysFontAlias);
}
- return m_pSysFont;
+ return m_pSysFont.Get();
default:
return nullptr;
}
@@ -67,8 +65,8 @@ CFX_ByteString CPVT_FontMap::GetPDFFontAlias(int32_t nFontIndex) {
return m_sDefFontAlias;
case 1:
if (!m_pSysFont) {
- m_pSysFont =
- GetAnnotSysPDFFont(m_pDocument, m_pResDict, &m_sSysFontAlias);
+ m_pSysFont = GetAnnotSysPDFFont(m_pDocument.Get(), m_pResDict.Get(),
+ &m_sSysFontAlias);
}
return m_sSysFontAlias;
default: