summaryrefslogtreecommitdiff
path: root/core/fxcrt/xml/cfx_xmlparser.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-02-13 21:09:32 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-02-13 21:09:32 +0000
commit20eb52e66c565d36a78dc1399f04f7485ccf8fe6 (patch)
tree679fc502d00ce8807295053b2e5e5ac79e14d43d /core/fxcrt/xml/cfx_xmlparser.cpp
parent80bf582f00adeefae67ae432b74c3b0609e7845e (diff)
downloadpdfium-20eb52e66c565d36a78dc1399f04f7485ccf8fe6.tar.xz
Cleanup CFX_XMLNode and friendschromium/3347
This CL removes unused methods from CFX_XMLNode, adds an AppendChild to handle the case of a -1 index to InsertChildNode, removes the InsertChildNode return value which is unused and cleans up various other things. Change-Id: I3a022e4dc2afffa6893ad11014034dd7ed301f13 Reviewed-on: https://pdfium-review.googlesource.com/26510 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcrt/xml/cfx_xmlparser.cpp')
-rw-r--r--core/fxcrt/xml/cfx_xmlparser.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/fxcrt/xml/cfx_xmlparser.cpp b/core/fxcrt/xml/cfx_xmlparser.cpp
index 0f08b06255..c81c4082eb 100644
--- a/core/fxcrt/xml/cfx_xmlparser.cpp
+++ b/core/fxcrt/xml/cfx_xmlparser.cpp
@@ -87,7 +87,7 @@ int32_t CFX_XMLParser::DoParser() {
m_ws1 = m_pParser->GetTargetName();
if (m_ws1 == L"originalXFAVersion" || m_ws1 == L"acrobat") {
m_pChild = new CFX_XMLInstruction(m_ws1);
- m_pParent->InsertChildNode(m_pChild);
+ m_pParent->AppendChild(m_pChild);
} else {
m_pChild = nullptr;
}
@@ -96,7 +96,7 @@ int32_t CFX_XMLParser::DoParser() {
case FX_XmlSyntaxResult::TagName:
m_ws1 = m_pParser->GetTagName();
m_pChild = new CFX_XMLElement(m_ws1);
- m_pParent->InsertChildNode(m_pChild);
+ m_pParent->AppendChild(m_pChild);
m_NodeStack.push(m_pChild);
m_pParent = m_pChild;
@@ -130,13 +130,13 @@ int32_t CFX_XMLParser::DoParser() {
case FX_XmlSyntaxResult::Text:
m_ws1 = m_pParser->GetTextData();
m_pChild = new CFX_XMLText(m_ws1);
- m_pParent->InsertChildNode(m_pChild);
+ m_pParent->AppendChild(m_pChild);
m_pChild = m_pParent;
break;
case FX_XmlSyntaxResult::CData:
m_ws1 = m_pParser->GetTextData();
m_pChild = new CFX_XMLCharData(m_ws1);
- m_pParent->InsertChildNode(m_pChild);
+ m_pParent->AppendChild(m_pChild);
m_pChild = m_pParent;
break;
case FX_XmlSyntaxResult::TargetData: