From 6f71bc1011872b66aed16516b7e8944085058a11 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 19 Feb 2019 18:48:37 +0300 Subject: compilation fix --- protocols/JabberG/src/jabber_xml.cpp | 34 +++++++++++++++++----------------- protocols/JabberG/src/jabber_xml.h | 6 +++--- 2 files changed, 20 insertions(+), 20 deletions(-) (limited to 'protocols/JabberG/src') diff --git a/protocols/JabberG/src/jabber_xml.cpp b/protocols/JabberG/src/jabber_xml.cpp index 3f5496d145..07b45dc73e 100644 --- a/protocols/JabberG/src/jabber_xml.cpp +++ b/protocols/JabberG/src/jabber_xml.cpp @@ -34,28 +34,28 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. XmlNodeIq::XmlNodeIq(const char *type, int id, const char *to) : XmlNode("iq") { - if (type != nullptr) *this << XATTR("type", type); - if (to != nullptr) *this << XATTR("to", to); - if (id != -1 ) *this << XATTRID(id); + if (type != nullptr) XmlAddAttr(*this, "type", type); + if (to != nullptr) XmlAddAttr(*this, "to", to); + if (id != -1 ) XmlAddAttrID(*this, id); } XmlNodeIq::XmlNodeIq(const char *type, const char *idStr, const char *to) : XmlNode("iq") { - if (type != nullptr) *this << XATTR("type", type ); - if (to != nullptr) *this << XATTR("to", to ); - if (idStr != nullptr) *this << XATTR("id", idStr); + if (type != nullptr) XmlAddAttr(*this, "type", type ); + if (to != nullptr) XmlAddAttr(*this, "to", to ); + if (idStr != nullptr) XmlAddAttr(*this, "id", idStr); } XmlNodeIq::XmlNodeIq(const char *type, TiXmlElement *node, const char *to) : XmlNode("iq") { - if (type != nullptr) *this << XATTR("type", type ); - if (to != nullptr) *this << XATTR("to", to ); + if (type != nullptr) XmlAddAttr(*this, "type", type ); + if (to != nullptr) XmlAddAttr(*this, "to", to ); if (node != nullptr) { const char *iqId = node->Attribute("id"); if (iqId != nullptr) - *this << XATTR("id", iqId); + XmlAddAttr(*this, "id", iqId); } } @@ -63,19 +63,19 @@ XmlNodeIq::XmlNodeIq(CJabberIqInfo *pInfo) : XmlNode("iq") { if (pInfo) { - if (pInfo->GetCharIqType() != nullptr) *this << XATTR("type", pInfo->GetCharIqType()); - if (pInfo->GetReceiver() != nullptr) *this << XATTR("to", pInfo->GetReceiver()); - if (pInfo->GetIqId() != -1) *this << XATTRID(pInfo->GetIqId()); + if (pInfo->GetCharIqType() != nullptr) XmlAddAttr(*this, "type", pInfo->GetCharIqType()); + if (pInfo->GetReceiver() != nullptr) XmlAddAttr(*this, "to", pInfo->GetReceiver()); + if (pInfo->GetIqId() != -1) XmlAddAttrID(*this, pInfo->GetIqId()); } } XmlNodeIq::XmlNodeIq(const char *type, CJabberIqInfo *pInfo) : XmlNode("iq") { - if (type != nullptr) *this << XATTR("type", type); + if (type != nullptr) XmlAddAttr(*this, "type", type); if (pInfo) { - if (pInfo->GetFrom() != nullptr) *this << XATTR("to", pInfo->GetFrom()); - if (pInfo->GetIdStr() != nullptr) *this << XATTR("id", pInfo->GetIdStr()); + if (pInfo->GetFrom() != nullptr) XmlAddAttr(*this, "to", pInfo->GetFrom()); + if (pInfo->GetIdStr() != nullptr) XmlAddAttr(*this, "id", pInfo->GetIdStr()); } } @@ -95,14 +95,14 @@ XmlNode::XmlNode(const char *pszName, const char *ptszText) ///////////////////////////////////////////////////////////////////////////////////////// -TiXmlElement*operator<<(TiXmlElement *node, const XCHILDNS &child) +TiXmlElement* __fastcall operator<<(TiXmlElement *node, const XCHILDNS &child) { TiXmlElement *res = XmlAddChild(node, child.name); res->SetAttribute("xmlns", child.ns); return res; } -TiXmlElement* operator<<(TiXmlElement *node, const XQUERY &child) +TiXmlElement* __fastcall operator<<(TiXmlElement *node, const XQUERY &child) { TiXmlElement *res = XmlAddChild(node, "query"); res->SetAttribute("xmlns", child.ns); diff --git a/protocols/JabberG/src/jabber_xml.h b/protocols/JabberG/src/jabber_xml.h index 60f4530f70..b21738e870 100644 --- a/protocols/JabberG/src/jabber_xml.h +++ b/protocols/JabberG/src/jabber_xml.h @@ -152,7 +152,7 @@ struct XCHILD {} }; -__forceinline TiXmlElement *operator<<(TiXmlElement *node, const XCHILD& child) +__forceinline TiXmlElement *operator<<(TiXmlElement *node, const XCHILD &child) { return XmlAddChild(node, child.name, child.value); } @@ -169,7 +169,7 @@ struct XCHILDNS {} }; -TiXmlElement *__fastcall operator<<(TiXmlElement *node, const XCHILDNS& child); +TiXmlElement* __fastcall operator<<(TiXmlElement *node, const XCHILDNS &child); ///////////////////////////////////////////////////////////////////////////////////////// @@ -182,7 +182,7 @@ struct XQUERY {} }; -TiXmlElement *__fastcall operator<<(TiXmlElement *node, const XQUERY& child); +TiXmlElement* __fastcall operator<<(TiXmlElement *node, const XQUERY& child); ///////////////////////////////////////////////////////////////////////////////////////// // Limited XPath support -- cgit v1.2.3