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

Unified Diff: xfa/fxfa/parser/xfa_utils_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_utils.h ('k') | xfa/fxgraphics/include/cfx_graphics.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/parser/xfa_utils_imp.cpp
diff --git a/xfa/fxfa/parser/xfa_utils_imp.cpp b/xfa/fxfa/parser/xfa_utils_imp.cpp
index d644880c4ccc4d2632157fe062f862a7ae26b256..23e6930cba249e89cf59b79d19bae69d522b4249 100644
--- a/xfa/fxfa/parser/xfa_utils_imp.cpp
+++ b/xfa/fxfa/parser/xfa_utils_imp.cpp
@@ -20,7 +20,7 @@ CXFA_Node* XFA_CreateUIChild(CXFA_Node* pNode, XFA_ELEMENT& eWidgetType) {
XFA_ELEMENT eType = pNode->GetClassID();
eWidgetType = eType;
if (eType != XFA_ELEMENT_Field && eType != XFA_ELEMENT_Draw) {
- return NULL;
+ return nullptr;
}
eWidgetType = XFA_ELEMENT_UNKNOWN;
XFA_ELEMENT eUIType = XFA_ELEMENT_UNKNOWN;
@@ -58,7 +58,7 @@ CXFA_Node* XFA_CreateUIChild(CXFA_Node* pNode, XFA_ELEMENT& eWidgetType) {
default:
break;
}
- CXFA_Node* pUIChild = NULL;
+ CXFA_Node* pUIChild = nullptr;
CXFA_Node* pUI = pNode->GetProperty(0, XFA_ELEMENT_Ui, TRUE);
CXFA_Node* pChild = pUI->GetNodeItem(XFA_NODEITEM_FirstChild);
for (; pChild; pChild = pChild->GetNodeItem(XFA_NODEITEM_NextSibling)) {
@@ -187,9 +187,9 @@ CXFA_LocaleValue XFA_GetLocaleValue(CXFA_WidgetData* pWidgetData) {
}
void XFA_GetPlainTextFromRichText(CFDE_XMLNode* pXMLNode,
CFX_WideString& wsPlainText) {
- if (pXMLNode == NULL) {
+ if (!pXMLNode)
return;
- }
+
switch (pXMLNode->GetType()) {
case FDE_XMLNODE_Element: {
CFDE_XMLElement* pXMLElement = static_cast<CFDE_XMLElement*>(pXMLNode);
« no previous file with comments | « xfa/fxfa/parser/xfa_utils.h ('k') | xfa/fxgraphics/include/cfx_graphics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698