diff options
author | Lei Zhang <thestig@chromium.org> | 2015-12-14 18:34:00 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-12-14 18:34:00 -0800 |
commit | 412e908082a361d0fd9591eab939e96a882212f1 (patch) | |
tree | 11726052ae08f13dc5a05a82cbce870758580aeb /core/src/fpdfdoc/doc_tagged.cpp | |
parent | 96660d6f382204339d6b1aadc3913303d436e252 (diff) | |
download | pdfium-412e908082a361d0fd9591eab939e96a882212f1.tar.xz |
Merge to XFA: Get rid of most instance of 'foo == NULL'
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1520063002 .
(cherry picked from commit e385244f8cd6ae376f6b3cf1265a0795d5d30eff)
Review URL: https://codereview.chromium.org/1528763003 .
Diffstat (limited to 'core/src/fpdfdoc/doc_tagged.cpp')
-rw-r--r-- | core/src/fpdfdoc/doc_tagged.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/src/fpdfdoc/doc_tagged.cpp b/core/src/fpdfdoc/doc_tagged.cpp index 7869834dd9..d51743b0dc 100644 --- a/core/src/fpdfdoc/doc_tagged.cpp +++ b/core/src/fpdfdoc/doc_tagged.cpp @@ -35,7 +35,7 @@ CPDF_StructTree* CPDF_StructTree::LoadDoc(const CPDF_Document* pDoc) { CPDF_StructTreeImpl::CPDF_StructTreeImpl(const CPDF_Document* pDoc) { CPDF_Dictionary* pCatalog = pDoc->GetRoot(); m_pTreeRoot = pCatalog->GetDict("StructTreeRoot"); - if (m_pTreeRoot == NULL) { + if (!m_pTreeRoot) { return; } m_pRoleMap = m_pTreeRoot->GetDict("RoleMap"); @@ -95,7 +95,7 @@ void CPDF_StructTreeImpl::LoadPageTree(const CPDF_Dictionary* pPageDict) { } CFX_MapPtrToPtr element_map; CPDF_Dictionary* pParentTree = m_pTreeRoot->GetDict("ParentTree"); - if (pParentTree == NULL) { + if (!pParentTree) { return; } CPDF_NumberTree parent_tree(pParentTree); @@ -107,7 +107,7 @@ void CPDF_StructTreeImpl::LoadPageTree(const CPDF_Dictionary* pPageDict) { for (i = 0; i < pParentArray->GetCount(); i++) { CPDF_Dictionary* pParent = pParentArray->GetDict(i); - if (pParent == NULL) { + if (!pParent) { continue; } AddPageNode(pParent, element_map); @@ -127,7 +127,7 @@ CPDF_StructElementImpl* CPDF_StructTreeImpl::AddPageNode(CPDF_Dictionary* pDict, pElement = new CPDF_StructElementImpl(this, NULL, pDict); map.SetAt(pDict, pElement); CPDF_Dictionary* pParent = pDict->GetDict("P"); - if (pParent == NULL || pParent->GetString("Type") == "StructTreeRoot") { + if (!pParent || pParent->GetString("Type") == "StructTreeRoot") { if (!AddTopLevelNode(pDict, pElement)) { pElement->Release(); map.RemoveKey(pDict); @@ -294,7 +294,7 @@ void CPDF_StructElementImpl::LoadKid(FX_DWORD PageObjNum, } else { pKid->m_Type = CPDF_StructKid::Element; pKid->m_Element.m_pDict = pKidDict; - if (m_pTree->m_pPage == NULL) { + if (!m_pTree->m_pPage) { pKid->m_Element.m_pElement = new CPDF_StructElementImpl(m_pTree, this, pKidDict); } else { @@ -339,7 +339,7 @@ CPDF_Object* CPDF_StructElementImpl::GetAttr(const CFX_ByteStringC& owner, if (pAttr) { return pAttr; } - if (m_pParent == NULL) { + if (!m_pParent) { return NULL; } return m_pParent->GetAttr(owner, name, TRUE, fLevel + 1); |