From 7981d15a799e3bdfaf6bd3e04fc08a6a43d143ec Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 11 Jan 2018 14:26:01 +0000 Subject: Add jumbo build support for fdrm, fpdfdoc and fxcrt. BUG=pdfium:964 Change-Id: Ifde885861aeafac803948bd537de826e2a3fddca Reviewed-on: https://pdfium-review.googlesource.com/22732 Commit-Queue: dsinclair Reviewed-by: dsinclair --- core/fpdfdoc/cpdf_nametree.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'core/fpdfdoc/cpdf_nametree.cpp') diff --git a/core/fpdfdoc/cpdf_nametree.cpp b/core/fpdfdoc/cpdf_nametree.cpp index 631571c9e4..3c5b08db21 100644 --- a/core/fpdfdoc/cpdf_nametree.cpp +++ b/core/fpdfdoc/cpdf_nametree.cpp @@ -17,7 +17,7 @@ namespace { -const int nMaxRecursion = 32; +constexpr int kNameTreeMaxRecursion = 32; std::pair GetNodeLimitsMaybeSwap(CPDF_Array* pLimits) { ASSERT(pLimits); @@ -40,7 +40,7 @@ bool GetNodeAncestorsLimits(const CPDF_Dictionary* pNode, const CPDF_Array* pFind, int nLevel, std::vector* pLimits) { - if (nLevel > nMaxRecursion) + if (nLevel > kNameTreeMaxRecursion) return false; if (pNode->GetArrayFor("Names") == pFind) { @@ -72,7 +72,7 @@ bool UpdateNodesAndLimitsUponDeletion(CPDF_Dictionary* pNode, const CPDF_Array* pFind, const WideString& csName, int nLevel) { - if (nLevel > nMaxRecursion) + if (nLevel > kNameTreeMaxRecursion) return false; CPDF_Array* pLimits = pNode->GetArrayFor("Limits"); @@ -159,7 +159,7 @@ CPDF_Object* SearchNameNodeByName(const CPDF_Dictionary* pNode, size_t* nIndex, CPDF_Array** ppFind, int* pFindIndex) { - if (nLevel > nMaxRecursion) + if (nLevel > kNameTreeMaxRecursion) return nullptr; CPDF_Array* pLimits = pNode->GetArrayFor("Limits"); @@ -235,7 +235,7 @@ CPDF_Object* SearchNameNodeByIndex(const CPDF_Dictionary* pNode, WideString* csName, CPDF_Array** ppFind, int* pFindIndex) { - if (nLevel > nMaxRecursion) + if (nLevel > kNameTreeMaxRecursion) return nullptr; CPDF_Array* pNames = pNode->GetArrayFor("Names"); @@ -272,7 +272,7 @@ CPDF_Object* SearchNameNodeByIndex(const CPDF_Dictionary* pNode, // Get the total number of key-value pairs in the tree with root |pNode|. size_t CountNamesInternal(CPDF_Dictionary* pNode, int nLevel) { - if (nLevel > nMaxRecursion) + if (nLevel > kNameTreeMaxRecursion) return 0; CPDF_Array* pNames = pNode->GetArrayFor("Names"); -- cgit v1.2.3