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

Unified Diff: xfa/fxfa/parser/xfa_script_imp.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_imp.h ('k') | xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/parser/xfa_script_imp.cpp
diff --git a/xfa/fxfa/parser/xfa_script_imp.cpp b/xfa/fxfa/parser/xfa_script_imp.cpp
index 55034a63998623eb2e5a473698f5e1a770921e3a..f5911512b43f59f72e077362f0250d47719d3356 100644
--- a/xfa/fxfa/parser/xfa_script_imp.cpp
+++ b/xfa/fxfa/parser/xfa_script_imp.cpp
@@ -107,7 +107,7 @@ CXFA_ScriptContext::~CXFA_ScriptContext() {
if (m_pJsContext) {
FXJSE_Context_Release(m_pJsContext);
- m_pJsContext = NULL;
+ m_pJsContext = nullptr;
}
delete m_pResolveProcessor;
m_upObjectArray.RemoveAll();
@@ -147,7 +147,7 @@ FX_BOOL CXFA_ScriptContext::RunScript(XFA_SCRIPTLANGTYPE eScriptType,
}
CXFA_Object* pOriginalObject = m_pThisObject;
m_pThisObject = pThisObject;
- CFXJSE_Value* pValue = pThisObject ? GetJSValueFromMap(pThisObject) : NULL;
+ CFXJSE_Value* pValue = pThisObject ? GetJSValueFromMap(pThisObject) : nullptr;
FX_BOOL bRet =
FXJSE_ExecuteScript(m_pJsContext, btScript.c_str(), hRetValue, pValue);
m_pThisObject = pOriginalObject;
@@ -331,7 +331,7 @@ void CXFA_ScriptContext::NormalPropertySetter(CFXJSE_Value* pOriginalValue,
wsPropName = wsPropName.Right(wsPropName.GetLength() - 1);
}
CXFA_Node* pNode = ToNode(pObject);
- CXFA_Node* pPropOrChild = NULL;
+ CXFA_Node* pPropOrChild = nullptr;
const XFA_ELEMENTINFO* lpElementInfo =
XFA_GetElementByName(wsPropName.AsStringC());
if (lpElementInfo) {
@@ -576,7 +576,7 @@ int32_t CXFA_ScriptContext::ResolveObjects(CXFA_Object* refNode,
if (dwStyles & XFA_RESOLVENODE_CreateNode) {
m_pResolveProcessor->GetNodeHelper()->XFA_SetCreateNodeType(bindNode);
}
- m_pResolveProcessor->GetNodeHelper()->m_pCreateParent = NULL;
+ m_pResolveProcessor->GetNodeHelper()->m_pCreateParent = nullptr;
m_pResolveProcessor->GetNodeHelper()->m_iCurAllStart = -1;
CXFA_ResolveNodesData rndFind;
int32_t nStart = 0;
@@ -595,7 +595,7 @@ int32_t CXFA_ScriptContext::ResolveObjects(CXFA_Object* refNode,
nStart, rndFind);
if (nStart < 1) {
if ((dwStyles & XFA_RESOLVENODE_CreateNode) && !bNextCreate) {
- CXFA_Node* pDataNode = NULL;
+ CXFA_Node* pDataNode = nullptr;
nStart = m_pResolveProcessor->GetNodeHelper()->m_iCurAllStart;
if (nStart != -1) {
pDataNode = m_pDocument->GetNotBindNode(findNodes);
@@ -672,7 +672,7 @@ int32_t CXFA_ScriptContext::ResolveObjects(CXFA_Object* refNode,
if (nNodes < 1) {
if (dwStyles & XFA_RESOLVENODE_CreateNode) {
bNextCreate = TRUE;
- if (m_pResolveProcessor->GetNodeHelper()->m_pCreateParent == NULL) {
+ if (!m_pResolveProcessor->GetNodeHelper()->m_pCreateParent) {
m_pResolveProcessor->GetNodeHelper()->m_pCreateParent =
ToNode(rndFind.m_CurNode);
m_pResolveProcessor->GetNodeHelper()->m_iCreateCount = 1;
« no previous file with comments | « xfa/fxfa/parser/xfa_script_imp.h ('k') | xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698