From 720e31a5113c25e48d7754bb812ab84c6c31d1d9 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Wed, 17 Dec 2014 13:37:57 +0100 Subject: Fix a few issues reported by static analyzers --- src/bridge/bridge.cpp | 2 +- src/bridge/bridge.hpp | 2 +- src/bridge/colors.cpp | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src/bridge') diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp index a7d8fe6..c925f9e 100644 --- a/src/bridge/bridge.cpp +++ b/src/bridge/bridge.cpp @@ -480,7 +480,7 @@ void Bridge::send_user_join(const std::string& hostname, affiliation, role, this->user_jid, self); } -void Bridge::send_topic(const std::string& hostname, const std::string& chan_name, const std::string topic) +void Bridge::send_topic(const std::string& hostname, const std::string& chan_name, const std::string& topic) { this->xmpp->send_topic(chan_name + "%" + hostname, this->make_xmpp_body(topic), this->user_jid); } diff --git a/src/bridge/bridge.hpp b/src/bridge/bridge.hpp index cf39545..c20bba2 100644 --- a/src/bridge/bridge.hpp +++ b/src/bridge/bridge.hpp @@ -114,7 +114,7 @@ public: /** * Send the topic of the MUC to the user */ - void send_topic(const std::string& hostname, const std::string& chan_name, const std::string topic); + void send_topic(const std::string& hostname, const std::string& chan_name, const std::string& topic); /** * Send a MUC message from some participant */ diff --git a/src/bridge/colors.cpp b/src/bridge/colors.cpp index 3aed07c..3d40ac4 100644 --- a/src/bridge/colors.cpp +++ b/src/bridge/colors.cpp @@ -166,10 +166,8 @@ Xmpp::body irc_format_to_xhtmlim(const std::string& s) { current_node->close(); result->add_child(current_node); - current_node = result.get(); } - result->close(); Xmpp::body body_res = std::make_tuple(cleaned, std::move(result)); return body_res; -- cgit v1.2.3