diff options
author | Lei Zhang <thestig@chromium.org> | 2018-08-04 02:21:44 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-04 02:21:44 +0000 |
commit | 03395da5d5827b6b3049d8632d8d3f5545e45293 (patch) | |
tree | 910f8e48db49cfc9f88d6e621fd2a183038d6b1d /core/fpdfapi/font/cpdf_cidfont.cpp | |
parent | f21b88ef08d6f6d64e783f55819fc8b86c3b370e (diff) | |
download | pdfium-03395da5d5827b6b3049d8632d8d3f5545e45293.tar.xz |
Set the CPDF_Font doc / font dict in the ctor.
Then we can mark the doc pointer as const because it never changes
again. Also move initialization to headers when possible, add missing
dtors, and fix some nits.
Change-Id: I461affc8dce14d805b935fb4d8b5aaafb058a789
Reviewed-on: https://pdfium-review.googlesource.com/39413
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/font/cpdf_cidfont.cpp')
-rw-r--r-- | core/fpdfapi/font/cpdf_cidfont.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/core/fpdfapi/font/cpdf_cidfont.cpp b/core/fpdfapi/font/cpdf_cidfont.cpp index ef471d02f1..b25b728ce0 100644 --- a/core/fpdfapi/font/cpdf_cidfont.cpp +++ b/core/fpdfapi/font/cpdf_cidfont.cpp @@ -207,11 +207,8 @@ bool IsMetricForCID(const uint32_t* pEntry, uint16_t CID) { } // namespace -CPDF_CIDFont::CPDF_CIDFont() - : m_pCID2UnicodeMap(nullptr), - m_bCIDIsGID(false), - m_bAnsiWidthsFixed(false), - m_bAdobeCourierStd(false) { +CPDF_CIDFont::CPDF_CIDFont(CPDF_Document* pDocument, CPDF_Dictionary* pFontDict) + : CPDF_Font(pDocument, pFontDict) { for (size_t i = 0; i < FX_ArraySize(m_CharBBox); ++i) m_CharBBox[i] = FX_RECT(-1, -1, -1, -1); } |