diff options
author | Lei Zhang <thestig@chromium.org> | 2018-07-16 20:18:28 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-07-16 20:18:28 +0000 |
commit | 4cf61e07625888a3b56c4de97719c87cf514fb7f (patch) | |
tree | b1ea8e7a51df07dfdd72839d18faccd2f8971d38 /core/fpdfapi/parser/cpdf_document.cpp | |
parent | 1d273f1cf00676725da6f0cd17e107f114030e87 (diff) | |
download | pdfium-4cf61e07625888a3b56c4de97719c87cf514fb7f.tar.xz |
Fix some nits in CPDF_Document.
Change-Id: I57f89b9f2a8ef3f351e7574a76d6064ffde150d3
Reviewed-on: https://pdfium-review.googlesource.com/37870
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser/cpdf_document.cpp')
-rw-r--r-- | core/fpdfapi/parser/cpdf_document.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/core/fpdfapi/parser/cpdf_document.cpp b/core/fpdfapi/parser/cpdf_document.cpp index 311e017148..2a825d7a9e 100644 --- a/core/fpdfapi/parser/cpdf_document.cpp +++ b/core/fpdfapi/parser/cpdf_document.cpp @@ -37,7 +37,7 @@ namespace { -const int FX_MAX_PAGE_LEVEL = 1024; +const int kMaxPageLevel = 1024; void InsertWidthArrayImpl(std::vector<int> widths, CPDF_Array* pWidthArray) { size_t i; @@ -184,11 +184,7 @@ std::unique_ptr<CPDF_Dictionary> CalculateFontDesc( } // namespace CPDF_Document::CPDF_Document() - : ParsedObjectsHolder(), - m_pRootDict(nullptr), - m_iNextPageToTraverse(0), - m_bReachedMaxPageLevel(false), - m_pDocPage(pdfium::MakeUnique<CPDF_DocPageData>(this)), + : m_pDocPage(pdfium::MakeUnique<CPDF_DocPageData>(this)), m_pDocRender(pdfium::MakeUnique<CPDF_DocRenderData>(this)) {} CPDF_Document::~CPDF_Document() { @@ -265,7 +261,7 @@ CPDF_Dictionary* CPDF_Document::TraversePDFPages(int iPage, m_PageList[iPage] = pPages->GetObjNum(); return pPages; } - if (level >= FX_MAX_PAGE_LEVEL) { + if (level >= kMaxPageLevel) { m_pTreeTraversal.pop_back(); m_bReachedMaxPageLevel = true; return nullptr; @@ -390,7 +386,7 @@ int CPDF_Document::FindPageIndex(const CPDF_Dictionary* pNode, if (!pKidList) return -1; - if (level >= FX_MAX_PAGE_LEVEL) + if (level >= kMaxPageLevel) return -1; size_t count = pNode->GetIntegerFor("Count"); |