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

Unified Diff: xfa/fxfa/parser/xfa_utils.h

Issue 1998873002: Clean up XFA code which causes warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 7 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_parser_imp.cpp ('k') | xfa/fxfa/parser/xfa_utils_imp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/parser/xfa_utils.h
diff --git a/xfa/fxfa/parser/xfa_utils.h b/xfa/fxfa/parser/xfa_utils.h
index 821e485e2576e37aa2c75933c39d2a1387307d05..d6633a4c7fbad5ed15127809542da82bbce62dc5 100644
--- a/xfa/fxfa/parser/xfa_utils.h
+++ b/xfa/fxfa/parser/xfa_utils.h
@@ -120,7 +120,7 @@ class CXFA_NodeIteratorTemplate {
NodeType** ppNode = NULL;
NodeType* pCurrent = GetCurrent();
while (m_NodeStack.GetSize() > 0) {
- while ((ppNode = m_NodeStack.GetTopElement())) {
+ while ((ppNode = m_NodeStack.GetTopElement()) != nullptr) {
if (pCurrent != *ppNode) {
return *ppNode;
}
@@ -130,7 +130,7 @@ class CXFA_NodeIteratorTemplate {
}
m_NodeStack.Push(pChild);
}
- while ((ppNode = m_NodeStack.GetTopElement())) {
+ while ((ppNode = m_NodeStack.GetTopElement()) != nullptr) {
NodeType* pNext = TraverseStrategy::GetNextSibling(*ppNode);
m_NodeStack.Pop();
if (m_NodeStack.GetSize() == 0) {
@@ -145,8 +145,8 @@ class CXFA_NodeIteratorTemplate {
return NULL;
}
NodeType* SkipChildrenAndMoveToNext() {
- NodeType** ppNode = NULL;
- while ((ppNode = m_NodeStack.GetTopElement())) {
+ NodeType** ppNode = nullptr;
+ while ((ppNode = m_NodeStack.GetTopElement()) != nullptr) {
NodeType* pNext = TraverseStrategy::GetNextSibling(*ppNode);
m_NodeStack.Pop();
if (m_NodeStack.GetSize() == 0) {
« no previous file with comments | « xfa/fxfa/parser/xfa_parser_imp.cpp ('k') | xfa/fxfa/parser/xfa_utils_imp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698