summaryrefslogtreecommitdiff
path: root/core/src/fxcrt/fx_xml_parser.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-14 18:34:00 -0800
committerLei Zhang <thestig@chromium.org>2015-12-14 18:34:00 -0800
commit412e908082a361d0fd9591eab939e96a882212f1 (patch)
tree11726052ae08f13dc5a05a82cbce870758580aeb /core/src/fxcrt/fx_xml_parser.cpp
parent96660d6f382204339d6b1aadc3913303d436e252 (diff)
downloadpdfium-412e908082a361d0fd9591eab939e96a882212f1.tar.xz
Merge to XFA: Get rid of most instance of 'foo == NULL'
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1520063002 . (cherry picked from commit e385244f8cd6ae376f6b3cf1265a0795d5d30eff) Review URL: https://codereview.chromium.org/1528763003 .
Diffstat (limited to 'core/src/fxcrt/fx_xml_parser.cpp')
-rw-r--r--core/src/fxcrt/fx_xml_parser.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/fxcrt/fx_xml_parser.cpp b/core/src/fxcrt/fx_xml_parser.cpp
index 56fbada3ad..0b71836ef9 100644
--- a/core/src/fxcrt/fx_xml_parser.cpp
+++ b/core/src/fxcrt/fx_xml_parser.cpp
@@ -463,7 +463,7 @@ CXML_Element* CXML_Parser::ParseElement(CXML_Element* pParent,
iState = 0;
m_dwIndex--;
CXML_Element* pSubElement = ParseElement(pElement, TRUE);
- if (pSubElement == NULL) {
+ if (!pSubElement) {
break;
}
pSubElement->m_pParent = pElement;
@@ -767,7 +767,7 @@ FX_DWORD CXML_Element::FindElement(CXML_Element* pChild) const {
}
const CFX_WideString* CXML_AttrMap::Lookup(const CFX_ByteStringC& space,
const CFX_ByteStringC& name) const {
- if (m_pMap == NULL) {
+ if (!m_pMap) {
return NULL;
}
for (int i = 0; i < m_pMap->GetSize(); i++) {
@@ -803,7 +803,7 @@ void CXML_AttrMap::SetAt(const CFX_ByteStringC& space,
}
void CXML_AttrMap::RemoveAt(const CFX_ByteStringC& space,
const CFX_ByteStringC& name) {
- if (m_pMap == NULL) {
+ if (!m_pMap) {
return;
}
for (int i = 0; i < m_pMap->GetSize(); i++) {
@@ -816,7 +816,7 @@ void CXML_AttrMap::RemoveAt(const CFX_ByteStringC& space,
}
}
int CXML_AttrMap::GetSize() const {
- return m_pMap == NULL ? 0 : m_pMap->GetSize();
+ return m_pMap ? m_pMap->GetSize() : 0;
}
CXML_AttrItem& CXML_AttrMap::GetAt(int index) const {
return (*m_pMap)[index];