summaryrefslogtreecommitdiff
path: root/src/bridge
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2015-09-01 04:42:12 +0200
committerFlorent Le Coz <louiz@louiz.org>2015-09-01 04:42:12 +0200
commite8f22efe34415db0e1e5cb94635b089b18efe055 (patch)
tree64088065cd97cb941b9d35016c0dcf3aaf355c5e /src/bridge
parentdf006a191603c4a9f0bb364affa3731c2944fef5 (diff)
downloadbiboumi-e8f22efe34415db0e1e5cb94635b089b18efe055.tar.gz
biboumi-e8f22efe34415db0e1e5cb94635b089b18efe055.tar.bz2
biboumi-e8f22efe34415db0e1e5cb94635b089b18efe055.tar.xz
biboumi-e8f22efe34415db0e1e5cb94635b089b18efe055.zip
XmlNodes are now always closed
Remove the close() method and closed attribute. Remove all the calls to close(). (Save one bool per XmlNode, yay, and save a few ifs and some useless function calls. At best it should be unnoticeably faster and lighter and save a few keystrokes in the future)
Diffstat (limited to 'src/bridge')
-rw-r--r--src/bridge/colors.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/bridge/colors.cpp b/src/bridge/colors.cpp
index 3d40ac4..bdc34bf 100644
--- a/src/bridge/colors.cpp
+++ b/src/bridge/colors.cpp
@@ -80,7 +80,6 @@ Xmpp::body irc_format_to_xhtmlim(const std::string& s)
else if (s[pos_end] == IRC_FORMAT_NEWLINE_CHAR)
{
XmlNode* br_node = new XmlNode("br");
- br_node->close();
current_node->add_child(br_node);
cleaned += '\n';
}
@@ -126,7 +125,6 @@ Xmpp::body irc_format_to_xhtmlim(const std::string& s)
// close opened span, if any
if (current_node != result.get())
{
- current_node->close();
result->add_child(current_node);
current_node = result.get();
}
@@ -163,12 +161,8 @@ Xmpp::body irc_format_to_xhtmlim(const std::string& s)
current_node->add_to_inner(txt);
if (current_node != result.get())
- {
- current_node->close();
- result->add_child(current_node);
- }
+ result->add_child(current_node);
- result->close();
Xmpp::body body_res = std::make_tuple(cleaned, std::move(result));
return body_res;
}