Pass the shared_ptr by reference, to avoid useless copies
This commit is contained in:
@@ -39,7 +39,7 @@ static std::set<std::string> kickable_errors{
|
||||
"malformed-error"
|
||||
};
|
||||
|
||||
XmppComponent::XmppComponent(std::shared_ptr<Poller> poller, const std::string& hostname, const std::string& secret):
|
||||
XmppComponent::XmppComponent(std::shared_ptr<Poller>& poller, const std::string& hostname, const std::string& secret):
|
||||
TCPClientSocketHandler(poller),
|
||||
ever_auth(false),
|
||||
first_connection_try(true),
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
class XmppComponent: public TCPClientSocketHandler
|
||||
{
|
||||
public:
|
||||
explicit XmppComponent(std::shared_ptr<Poller> poller, const std::string& hostname, const std::string& secret);
|
||||
explicit XmppComponent(std::shared_ptr<Poller>& poller, const std::string& hostname, const std::string& secret);
|
||||
virtual ~XmppComponent() = default;
|
||||
|
||||
XmppComponent(const XmppComponent&) = delete;
|
||||
|
||||
Reference in New Issue
Block a user