summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-05-25 16:24:48 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-25 16:24:48 +0000
commit710fa99b0bd26e6761c4481b4b9b6d26d2954c3e (patch)
tree0c744f3485faa3a91779286dd0f5ef9c0ac26337 /core/fpdfapi/font
parentcbf1550e48e300142a53f635daba3c1d8910add9 (diff)
downloadpdfium-710fa99b0bd26e6761c4481b4b9b6d26d2954c3e.tar.xz
Mark CPDF_Object pointers in pattern code as const.
Change-Id: Id7bf252ebe25c92d26065d1138a445ebb2f78d0b Reviewed-on: https://pdfium-review.googlesource.com/32187 Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fpdfapi/font')
-rw-r--r--core/fpdfapi/font/cpdf_font.cpp1
-rw-r--r--core/fpdfapi/font/cpdf_font.h3
2 files changed, 3 insertions, 1 deletions
diff --git a/core/fpdfapi/font/cpdf_font.cpp b/core/fpdfapi/font/cpdf_font.cpp
index ad7eeea264..2201e390ff 100644
--- a/core/fpdfapi/font/cpdf_font.cpp
+++ b/core/fpdfapi/font/cpdf_font.cpp
@@ -315,6 +315,7 @@ CPDF_Font* CPDF_Font::GetStockFont(CPDF_Document* pDoc,
return pFontGlobals->Set(pDoc, font_id, CPDF_Font::Create(nullptr, pDict));
}
+// static
std::unique_ptr<CPDF_Font> CPDF_Font::Create(CPDF_Document* pDoc,
CPDF_Dictionary* pFontDict) {
ByteString type = pFontDict->GetStringFor("Subtype");
diff --git a/core/fpdfapi/font/cpdf_font.h b/core/fpdfapi/font/cpdf_font.h
index 588fb66163..cda86e6ea3 100644
--- a/core/fpdfapi/font/cpdf_font.h
+++ b/core/fpdfapi/font/cpdf_font.h
@@ -66,7 +66,8 @@ class CPDF_Font {
const ByteString& GetBaseFont() const { return m_BaseFont; }
CFX_SubstFont* GetSubstFont() const { return m_Font.GetSubstFont(); }
bool IsEmbedded() const { return IsType3Font() || m_pFontFile != nullptr; }
- CPDF_Dictionary* GetFontDict() const { return m_pFontDict; }
+ const CPDF_Dictionary* GetFontDict() const { return m_pFontDict; }
+ CPDF_Dictionary* GetFontDict() { return m_pFontDict; }
bool IsStandardFont() const;
FXFT_Face GetFace() const { return m_Font.GetFace(); }
void AppendChar(ByteString* str, uint32_t charcode) const;