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:
Vadim Zeitlin 2024-02-03 19:37:16 +01:00
parent 9550c37e29
commit f943635da8

View file

@ -2262,18 +2262,7 @@ bool wxXmlResourceHandlerImpl::IsObjectNode(const wxXmlNode *node) const
wxString wxXmlResourceHandlerImpl::GetNodeContent(const wxXmlNode *node) wxString wxXmlResourceHandlerImpl::GetNodeContent(const wxXmlNode *node)
{ {
const wxXmlNode *n = node; return node ? node->GetNodeContent() : wxString{};
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;
} }
wxXmlNode *wxXmlResourceHandlerImpl::GetNodeParent(const wxXmlNode *node) const wxXmlNode *wxXmlResourceHandlerImpl::GetNodeParent(const wxXmlNode *node) const