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

Unified Diff: xfa/fxfa/parser/xfa_script_resolveprocessor.cpp

Issue 2031873003: Get rid of NULLs in xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@nullptr_fpdfsdk
Patch Set: 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 | « xfa/fxfa/parser/xfa_script_resolveprocessor.h ('k') | xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/parser/xfa_script_resolveprocessor.cpp
diff --git a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp
index 6be5bd03e67c1d3b55b9e0357465fa613d179e2a..93c21ad3493db96716306d6f181bccf9c08dbf7f 100644
--- a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp
+++ b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp
@@ -25,9 +25,9 @@ CXFA_ResolveProcessor::~CXFA_ResolveProcessor(void) {
}
int32_t CXFA_ResolveProcessor::XFA_ResolveNodes(CXFA_ResolveNodesData& rnd) {
- if (rnd.m_CurNode == NULL) {
+ if (!rnd.m_CurNode)
return -1;
- }
+
if (!rnd.m_CurNode->IsNode()) {
if (rnd.m_dwStyles & XFA_RESOLVENODE_Attributes) {
return XFA_ResolveNodes_ForAttributeRs(rnd.m_CurNode, rnd,
@@ -84,7 +84,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_AnyChild(
CXFA_ResolveNodesData& rnd) {
CFX_WideString wsName = rnd.m_wsName;
CFX_WideString wsCondition = rnd.m_wsCondition;
- CXFA_Node* findNode = NULL;
+ CXFA_Node* findNode = nullptr;
CXFA_NodeArray siblings;
FX_BOOL bClassName = FALSE;
if (wsName.GetAt(0) == '#') {
@@ -93,9 +93,9 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_AnyChild(
}
findNode = m_pNodeHelper->XFA_ResolveNodes_GetOneChild(
ToNode(rnd.m_CurNode), wsName.c_str(), bClassName);
- if (findNode == NULL) {
+ if (!findNode)
return 0;
- }
+
if (wsCondition.IsEmpty()) {
rnd.m_Nodes.Add(findNode);
return rnd.m_Nodes.GetSize();
@@ -226,8 +226,8 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Normal(
rndFind.m_uHashName = uNameHash;
CXFA_NodeArray children;
CXFA_NodeArray properties;
- CXFA_Node* pVariablesNode = NULL;
- CXFA_Node* pPageSetNode = NULL;
+ CXFA_Node* pVariablesNode = nullptr;
+ CXFA_Node* pPageSetNode = nullptr;
CXFA_Node* pChild = curNode->GetNodeItem(XFA_NODEITEM_FirstChild);
while (pChild) {
if (pChild->GetClassID() == XFA_ELEMENT_Variables) {
@@ -352,7 +352,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Normal(
}
return 0;
}
- CXFA_Node* pProp = NULL;
+ CXFA_Node* pProp = nullptr;
if (XFA_ELEMENT_Subform == curNode->GetClassID() &&
XFA_HASHCODE_Occur == uNameHash) {
CXFA_Node* pInstanceManager =
@@ -649,7 +649,7 @@ void CXFA_ResolveProcessor::XFA_ResolveNode_ConditionArray(
m_pNodeHelper->m_iCreateCount = 1;
findNodes.RemoveAll();
m_pNodeHelper->m_iCurAllStart = -1;
- m_pNodeHelper->m_pAllStartParent = NULL;
+ m_pNodeHelper->m_pAllStartParent = nullptr;
} else {
if (m_pNodeHelper->m_iCurAllStart == -1) {
m_pNodeHelper->m_iCurAllStart = m_iCurStart;
« no previous file with comments | « xfa/fxfa/parser/xfa_script_resolveprocessor.h ('k') | xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698