diff options
Diffstat (limited to 'louloulibs/xmpp/xmpp_stanza.cpp')
-rw-r--r-- | louloulibs/xmpp/xmpp_stanza.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/louloulibs/xmpp/xmpp_stanza.cpp b/louloulibs/xmpp/xmpp_stanza.cpp index 3ba8483..4c0f5c7 100644 --- a/louloulibs/xmpp/xmpp_stanza.cpp +++ b/louloulibs/xmpp/xmpp_stanza.cpp @@ -178,6 +178,12 @@ XmlNode* XmlNode::add_child(XmlNode&& child) return this->add_child(std::move(new_node)); } +XmlNode* XmlNode::add_child(const XmlNode& child) +{ + auto new_node = std::make_unique<XmlNode>(child); + return this->add_child(std::move(new_node)); +} + XmlNode* XmlNode::get_last_child() const { return this->children.back().get(); |