Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1564)

Unified Diff: core/fpdfdoc/doc_tagged.cpp

Issue 2032613003: Get rid of NULLs in core/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Fix a bad merge Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfdoc/doc_form.cpp ('k') | core/fpdfdoc/doc_utils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfdoc/doc_tagged.cpp
diff --git a/core/fpdfdoc/doc_tagged.cpp b/core/fpdfdoc/doc_tagged.cpp
index b5b89a017ed67af44f49ce20e6928dcc4b1ad30d..05109bb7473e2190240523948181fb370eb03a95 100644
--- a/core/fpdfdoc/doc_tagged.cpp
+++ b/core/fpdfdoc/doc_tagged.cpp
@@ -132,14 +132,14 @@ CPDF_StructElementImpl* CPDF_StructTreeImpl::AddPageNode(
std::map<CPDF_Dictionary*, CPDF_StructElementImpl*>& map,
int nLevel) {
if (nLevel > nMaxRecursion)
- return NULL;
+ return nullptr;
auto it = map.find(pDict);
if (it != map.end())
return it->second;
CPDF_StructElementImpl* pElement =
- new CPDF_StructElementImpl(this, NULL, pDict);
+ new CPDF_StructElementImpl(this, nullptr, pDict);
map[pDict] = pElement;
CPDF_Dictionary* pParent = pDict->GetDictBy("P");
if (!pParent || pParent->GetStringBy("Type") == "StructTreeRoot") {
@@ -301,7 +301,7 @@ void CPDF_StructElementImpl::LoadKid(uint32_t PageObjNum,
pKid->m_Element.m_pElement =
new CPDF_StructElementImpl(m_pTree, this, pKidDict);
} else {
- pKid->m_Element.m_pElement = NULL;
+ pKid->m_Element.m_pElement = nullptr;
}
}
}
@@ -335,7 +335,7 @@ CPDF_Object* CPDF_StructElementImpl::GetAttr(const CFX_ByteStringC& owner,
FX_BOOL bInheritable,
FX_FLOAT fLevel) {
if (fLevel > nMaxRecursion) {
- return NULL;
+ return nullptr;
}
if (bInheritable) {
CPDF_Object* pAttr = GetAttr(owner, name, FALSE);
@@ -343,7 +343,7 @@ CPDF_Object* CPDF_StructElementImpl::GetAttr(const CFX_ByteStringC& owner,
return pAttr;
}
if (!m_pParent) {
- return NULL;
+ return nullptr;
}
return m_pParent->GetAttr(owner, name, TRUE, fLevel + 1);
}
« no previous file with comments | « core/fpdfdoc/doc_form.cpp ('k') | core/fpdfdoc/doc_utils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698