diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-19 16:03:14 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-19 19:24:17 +0300 |
commit | caad82eecc865ff2222c181874811181a9a8809d (patch) | |
tree | 1b0cadd61cca334ffce025c11e4b60b1babbb6f1 /protocols/JabberG/src/jabber_xml.cpp | |
parent | fc8f2a3b692878aa581bf3fcd5c1c3c2295bbcb5 (diff) |
code cleaning
Diffstat (limited to 'protocols/JabberG/src/jabber_xml.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_xml.cpp | 7 |
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;
}
/////////////////////////////////////////////////////////////////////////////////////////
|