diff options
author | Lei Zhang <thestig@chromium.org> | 2018-05-25 21:55:24 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-25 21:55:24 +0000 |
commit | b1ec280837cc6e1932754ef40de26d12b77aa910 (patch) | |
tree | b1af6fdc4174eaf671cbd23f8f59b9bbf2428fb7 /core/fpdfapi/font/cpdf_font.cpp | |
parent | de579ab0092d43fe037c381710da998b9ff823e9 (diff) | |
download | pdfium-b1ec280837cc6e1932754ef40de26d12b77aa910.tar.xz |
Add proper const/non-const versions of CPDF_Dictionary::GetDictFor().
BUG=pdfium:234
Change-Id: I6fde00c976ad4bb9cab632f465cf292f5b1da3d2
Reviewed-on: https://pdfium-review.googlesource.com/32914
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.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/fpdfapi/font/cpdf_font.cpp b/core/fpdfapi/font/cpdf_font.cpp index cc867d69d9..0bba1057e7 100644 --- a/core/fpdfapi/font/cpdf_font.cpp +++ b/core/fpdfapi/font/cpdf_font.cpp @@ -324,7 +324,8 @@ std::unique_ptr<CPDF_Font> CPDF_Font::Create(CPDF_Document* pDoc, ByteString tag = pFontDict->GetStringFor("BaseFont").Left(4); for (size_t i = 0; i < FX_ArraySize(kChineseFontNames); ++i) { if (tag == ByteString(kChineseFontNames[i], 4)) { - CPDF_Dictionary* pFontDesc = pFontDict->GetDictFor("FontDescriptor"); + const CPDF_Dictionary* pFontDesc = + pFontDict->GetDictFor("FontDescriptor"); if (!pFontDesc || !pFontDesc->KeyExist("FontFile2")) pFont = pdfium::MakeUnique<CPDF_CIDFont>(); break; |