From f0bc6c83a8eb548d0a3edbf7c16a6922bfd24ba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Wed, 8 Mar 2017 19:04:15 +0100 Subject: Pass the shared_ptr by reference, to avoid useless copies --- src/bridge/bridge.cpp | 2 +- src/bridge/bridge.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/bridge') diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp index 573e8d7..7e2d8c1 100644 --- a/src/bridge/bridge.cpp +++ b/src/bridge/bridge.cpp @@ -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): +Bridge::Bridge(const std::string& user_jid, BiboumiComponent& xmpp, std::shared_ptr& poller): user_jid(user_jid), xmpp(xmpp), poller(poller) diff --git a/src/bridge/bridge.hpp b/src/bridge/bridge.hpp index b165650..73daae7 100644 --- a/src/bridge/bridge.hpp +++ b/src/bridge/bridge.hpp @@ -38,7 +38,7 @@ using irc_responder_callback_t = std::function poller); + explicit Bridge(const std::string& user_jid, BiboumiComponent& xmpp, std::shared_ptr& poller); ~Bridge() = default; Bridge(const Bridge&) = delete; -- cgit v1.2.3