diff options
author | Lei Zhang <thestig@chromium.org> | 2018-05-25 21:47:39 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-25 21:47:39 +0000 |
commit | 1f17bd73afa6b1b79ec4a2f81c995b43d15a9814 (patch) | |
tree | 1e19c89fc5b56a90c0a85d5a1d05f126f54dd9ce /core/fpdfapi/font/cpdf_type3font.cpp | |
parent | fa4d93a08d5cd4f349c480b194a3e795273b27ed (diff) | |
download | pdfium-1f17bd73afa6b1b79ec4a2f81c995b43d15a9814.tar.xz |
Mark more CPDF_Objects as const in font code.
Change-Id: Id37333ba61ad0d395055acffd75d4d8be5eb2b3e
Reviewed-on: https://pdfium-review.googlesource.com/32911
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/font/cpdf_type3font.cpp')
-rw-r--r-- | core/fpdfapi/font/cpdf_type3font.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdfapi/font/cpdf_type3font.cpp b/core/fpdfapi/font/cpdf_type3font.cpp index c321f87897..9a79c30cab 100644 --- a/core/fpdfapi/font/cpdf_type3font.cpp +++ b/core/fpdfapi/font/cpdf_type3font.cpp @@ -43,7 +43,7 @@ CPDF_Type3Font* CPDF_Type3Font::AsType3Font() { bool CPDF_Type3Font::Load() { m_pFontResources = m_pFontDict->GetDictFor("Resources"); - CPDF_Array* pMatrix = m_pFontDict->GetArrayFor("FontMatrix"); + const CPDF_Array* pMatrix = m_pFontDict->GetArrayFor("FontMatrix"); float xscale = 1.0f; float yscale = 1.0f; if (pMatrix) { @@ -52,7 +52,7 @@ bool CPDF_Type3Font::Load() { yscale = m_FontMatrix.d; } - CPDF_Array* pBBox = m_pFontDict->GetArrayFor("FontBBox"); + const CPDF_Array* pBBox = m_pFontDict->GetArrayFor("FontBBox"); if (pBBox) { CFX_FloatRect box( pBBox->GetNumberAt(0) * xscale, pBBox->GetNumberAt(1) * yscale, @@ -64,7 +64,7 @@ bool CPDF_Type3Font::Load() { static constexpr size_t kCharLimit = FX_ArraySize(m_CharWidthL); int StartChar = m_pFontDict->GetIntegerFor("FirstChar"); if (StartChar >= 0 && static_cast<size_t>(StartChar) < kCharLimit) { - CPDF_Array* pWidthArray = m_pFontDict->GetArrayFor("Widths"); + const CPDF_Array* pWidthArray = m_pFontDict->GetArrayFor("Widths"); if (pWidthArray) { size_t count = std::min(pWidthArray->GetCount(), kCharLimit); count = std::min(count, kCharLimit - StartChar); |