summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-22 15:15:30 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-22 23:44:01 +0000
commit4cb82ee95256f110489f2b503e70729c44419e74 (patch)
tree56d11efe9bd8e93af2145c02f4f3c84ea3954f55 /core/fpdfapi/font
parent355954b8f09a65934b95dd6ca1299a73ae5e24b2 (diff)
downloadpdfium-4cb82ee95256f110489f2b503e70729c44419e74.tar.xz
Convert more c-style pointers to CFX_UnownedPtr
Change-Id: I551b4210c95db0b916e9fe6cddf11e6c3d015c50 Reviewed-on: https://pdfium-review.googlesource.com/5790 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/font')
-rw-r--r--core/fpdfapi/font/cpdf_type3font.cpp3
-rw-r--r--core/fpdfapi/font/cpdf_type3font.h6
2 files changed, 5 insertions, 4 deletions
diff --git a/core/fpdfapi/font/cpdf_type3font.cpp b/core/fpdfapi/font/cpdf_type3font.cpp
index 79f6617ce3..1e8c567a7f 100644
--- a/core/fpdfapi/font/cpdf_type3font.cpp
+++ b/core/fpdfapi/font/cpdf_type3font.cpp
@@ -107,7 +107,8 @@ CPDF_Type3Char* CPDF_Type3Font::LoadChar(uint32_t charcode) {
auto pNewChar =
pdfium::MakeUnique<CPDF_Type3Char>(pdfium::MakeUnique<CPDF_Form>(
- m_pDocument, m_pFontResources ? m_pFontResources : m_pPageResources,
+ m_pDocument,
+ m_pFontResources ? m_pFontResources.Get() : m_pPageResources.Get(),
pStream, nullptr));
// This can trigger recursion into this method. The content of |m_CacheMap|
diff --git a/core/fpdfapi/font/cpdf_type3font.h b/core/fpdfapi/font/cpdf_type3font.h
index 0bae192d61..135a19fb7c 100644
--- a/core/fpdfapi/font/cpdf_type3font.h
+++ b/core/fpdfapi/font/cpdf_type3font.h
@@ -48,9 +48,9 @@ class CPDF_Type3Font : public CPDF_SimpleFont {
void LoadGlyphMap() override {}
int m_CharWidthL[256];
- CPDF_Dictionary* m_pCharProcs;
- CPDF_Dictionary* m_pPageResources;
- CPDF_Dictionary* m_pFontResources;
+ CFX_UnownedPtr<CPDF_Dictionary> m_pCharProcs;
+ CFX_UnownedPtr<CPDF_Dictionary> m_pPageResources;
+ CFX_UnownedPtr<CPDF_Dictionary> m_pFontResources;
std::map<uint32_t, std::unique_ptr<CPDF_Type3Char>> m_CacheMap;
// The depth char loading is in, to avoid recurive calling LoadChar().
int m_CharLoadingDepth;