Reuse wxXmlNode::GetNodeContent() in wxXmlResourceHandlerImpl
Don't duplicate wxXmlNode function logic but just call it instead. This shouldn't result in any changes.
This commit is contained in:
parent
9550c37e29
commit
f943635da8
1 changed files with 1 additions and 12 deletions
|
|
@ -2262,18 +2262,7 @@ bool wxXmlResourceHandlerImpl::IsObjectNode(const wxXmlNode *node) const
|
|||
|
||||
wxString wxXmlResourceHandlerImpl::GetNodeContent(const wxXmlNode *node)
|
||||
{
|
||||
const wxXmlNode *n = node;
|
||||
if (n == nullptr) return wxEmptyString;
|
||||
n = n->GetChildren();
|
||||
|
||||
while (n)
|
||||
{
|
||||
if (n->GetType() == wxXML_TEXT_NODE ||
|
||||
n->GetType() == wxXML_CDATA_SECTION_NODE)
|
||||
return n->GetContent();
|
||||
n = n->GetNext();
|
||||
}
|
||||
return wxEmptyString;
|
||||
return node ? node->GetNodeContent() : wxString{};
|
||||
}
|
||||
|
||||
wxXmlNode *wxXmlResourceHandlerImpl::GetNodeParent(const wxXmlNode *node) const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue