Pass the shared_ptr by reference, to avoid useless copies

This commit is contained in:
louiz’
2017-03-08 19:04:15 +01:00
parent cd92baae3f
commit f0bc6c83a8
21 changed files with 21 additions and 21 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ static std::string in_encoding_for(const Bridge& bridge, const Iid& iid)
#endif
}
Bridge::Bridge(const std::string& user_jid, BiboumiComponent& xmpp, std::shared_ptr<Poller> poller):
Bridge::Bridge(const std::string& user_jid, BiboumiComponent& xmpp, std::shared_ptr<Poller>& poller):
user_jid(user_jid),
xmpp(xmpp),
poller(poller)
+1 -1
View File
@@ -38,7 +38,7 @@ using irc_responder_callback_t = std::function<bool(const std::string& irc_hostn
class Bridge
{
public:
explicit Bridge(const std::string& user_jid, BiboumiComponent& xmpp, std::shared_ptr<Poller> poller);
explicit Bridge(const std::string& user_jid, BiboumiComponent& xmpp, std::shared_ptr<Poller>& poller);
~Bridge() = default;
Bridge(const Bridge&) = delete;