summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font/cpdf_font.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-05-25 21:47:39 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-25 21:47:39 +0000
commit1f17bd73afa6b1b79ec4a2f81c995b43d15a9814 (patch)
tree1e19c89fc5b56a90c0a85d5a1d05f126f54dd9ce /core/fpdfapi/font/cpdf_font.cpp
parentfa4d93a08d5cd4f349c480b194a3e795273b27ed (diff)
downloadpdfium-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_font.cpp')
-rw-r--r--core/fpdfapi/font/cpdf_font.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdfapi/font/cpdf_font.cpp b/core/fpdfapi/font/cpdf_font.cpp
index 35fed75c87..cc867d69d9 100644
--- a/core/fpdfapi/font/cpdf_font.cpp
+++ b/core/fpdfapi/font/cpdf_font.cpp
@@ -164,7 +164,7 @@ bool CPDF_Font::HasFontWidths() const {
return true;
}
-void CPDF_Font::LoadFontDescriptor(CPDF_Dictionary* pFontDesc) {
+void CPDF_Font::LoadFontDescriptor(const CPDF_Dictionary* pFontDesc) {
m_Flags = pFontDesc->GetIntegerFor("Flags", FXFONT_NONSYMBOLIC);
int ItalicAngle = 0;
bool bExistItalicAngle = false;
@@ -200,7 +200,7 @@ void CPDF_Font::LoadFontDescriptor(CPDF_Dictionary* pFontDesc) {
}
if (m_Descent > 10)
m_Descent = -m_Descent;
- CPDF_Array* pBBox = pFontDesc->GetArrayFor("FontBBox");
+ const CPDF_Array* pBBox = pFontDesc->GetArrayFor("FontBBox");
if (pBBox) {
m_FontBBox.left = pBBox->GetIntegerAt(0);
m_FontBBox.bottom = pBBox->GetIntegerAt(1);
@@ -208,7 +208,7 @@ void CPDF_Font::LoadFontDescriptor(CPDF_Dictionary* pFontDesc) {
m_FontBBox.top = pBBox->GetIntegerAt(3);
}
- CPDF_Stream* pFontFile = pFontDesc->GetStreamFor("FontFile");
+ const CPDF_Stream* pFontFile = pFontDesc->GetStreamFor("FontFile");
if (!pFontFile)
pFontFile = pFontDesc->GetStreamFor("FontFile2");
if (!pFontFile)