summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_xml.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-02-19 16:03:14 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-02-19 19:24:17 +0300
commitcaad82eecc865ff2222c181874811181a9a8809d (patch)
tree1b0cadd61cca334ffce025c11e4b60b1babbb6f1 /protocols/JabberG/src/jabber_xml.cpp
parentfc8f2a3b692878aa581bf3fcd5c1c3c2295bbcb5 (diff)
code cleaning
Diffstat (limited to 'protocols/JabberG/src/jabber_xml.cpp')
-rw-r--r--protocols/JabberG/src/jabber_xml.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/protocols/JabberG/src/jabber_xml.cpp b/protocols/JabberG/src/jabber_xml.cpp
index 89f39e567d..142f0bc331 100644
--- a/protocols/JabberG/src/jabber_xml.cpp
+++ b/protocols/JabberG/src/jabber_xml.cpp
@@ -104,10 +104,9 @@ TiXmlElement*operator<<(TiXmlElement *node, const XCHILDNS &child)
TiXmlElement* operator<<(TiXmlElement *node, const XQUERY &child)
{
- TiXmlElement *n = node->GetDocument()->NewElement("query");
- if (n)
- n->SetAttribute("xmlns", child.ns);
- return n;
+ TiXmlElement *res = XmlAddChild(node, "query");
+ res->SetAttribute("xmlns", child.ns);
+ return res;
}
/////////////////////////////////////////////////////////////////////////////////////////