summaryrefslogtreecommitdiff
path: root/core/fxcrt/xml/cfx_xmlelement.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-02-13 21:44:33 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-02-13 21:44:33 +0000
commitfa3765cce4da4c3923e525f0462afd794360d221 (patch)
tree2a246bc47d7584edf5d8dd2c124f6c21c26cd5c8 /core/fxcrt/xml/cfx_xmlelement.cpp
parent9c112f92d4c2046d5a4f8538f4d18b74a87649d4 (diff)
downloadpdfium-fa3765cce4da4c3923e525f0462afd794360d221.tar.xz
Cleanup CFX_XMLNode pointers
This CL cleans up hte CFX_XMLNode pointers. Each pointer has been renamed to make the usage clearer, the NodeItems method has been removed in favour of distinct accessors and the node pointers have been made private. Change-Id: I5459a77a0ae93b08741a0cd59266ef9c81ddad75 Reviewed-on: https://pdfium-review.googlesource.com/26550 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcrt/xml/cfx_xmlelement.cpp')
-rw-r--r--core/fxcrt/xml/cfx_xmlelement.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/fxcrt/xml/cfx_xmlelement.cpp b/core/fxcrt/xml/cfx_xmlelement.cpp
index bba6fe6187..39233190b1 100644
--- a/core/fxcrt/xml/cfx_xmlelement.cpp
+++ b/core/fxcrt/xml/cfx_xmlelement.cpp
@@ -29,7 +29,7 @@ std::unique_ptr<CFX_XMLNode> CFX_XMLElement::Clone() {
pClone->SetAttributes(GetAttributes());
WideString wsText;
- CFX_XMLNode* pChild = m_pChild;
+ CFX_XMLNode* pChild = GetFirstChild();
while (pChild) {
switch (pChild->GetType()) {
case FX_XMLNODE_Text:
@@ -38,7 +38,7 @@ std::unique_ptr<CFX_XMLNode> CFX_XMLElement::Clone() {
default:
break;
}
- pChild = pChild->m_pNext;
+ pChild = pChild->GetNextSibling();
}
pClone->SetTextData(wsText);
return std::move(pClone);
@@ -71,7 +71,7 @@ WideString CFX_XMLElement::GetNamespaceURI() const {
auto* pElement = static_cast<const CFX_XMLElement*>(pNode);
if (!pElement->HasAttribute(wsAttri)) {
- pNode = pNode->GetNodeItem(CFX_XMLNode::Parent);
+ pNode = pNode->GetParent();
continue;
}
return pElement->GetString(wsAttri);
@@ -81,7 +81,7 @@ WideString CFX_XMLElement::GetNamespaceURI() const {
WideString CFX_XMLElement::GetTextData() const {
CFX_WideTextBuf buffer;
- CFX_XMLNode* pChild = m_pChild;
+ CFX_XMLNode* pChild = GetFirstChild();
while (pChild) {
switch (pChild->GetType()) {
case FX_XMLNODE_Text:
@@ -91,7 +91,7 @@ WideString CFX_XMLElement::GetTextData() const {
default:
break;
}
- pChild = pChild->m_pNext;
+ pChild = pChild->GetNextSibling();
}
return buffer.MakeString();
}