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/identd/identd_server.hpp | 2 +- src/identd/identd_socket.cpp | 2 +- src/identd/identd_socket.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/identd') diff --git a/src/identd/identd_server.hpp b/src/identd/identd_server.hpp index 5f74976..b1c8ec8 100644 --- a/src/identd/identd_server.hpp +++ b/src/identd/identd_server.hpp @@ -10,7 +10,7 @@ class BiboumiComponent; class IdentdServer: public TcpSocketServer { public: - IdentdServer(const BiboumiComponent& biboumi_component, std::shared_ptr poller, const uint16_t port): + IdentdServer(const BiboumiComponent& biboumi_component, std::shared_ptr& poller, const uint16_t port): TcpSocketServer(poller, port), biboumi_component(biboumi_component) {} diff --git a/src/identd/identd_socket.cpp b/src/identd/identd_socket.cpp index a94f172..b85257c 100644 --- a/src/identd/identd_socket.cpp +++ b/src/identd/identd_socket.cpp @@ -8,7 +8,7 @@ #include -IdentdSocket::IdentdSocket(std::shared_ptr poller, const socket_t socket, TcpSocketServer& server): +IdentdSocket::IdentdSocket(std::shared_ptr& poller, const socket_t socket, TcpSocketServer& server): TCPSocketHandler(poller), server(dynamic_cast(server)) { diff --git a/src/identd/identd_socket.hpp b/src/identd/identd_socket.hpp index 1c2bd27..10cb797 100644 --- a/src/identd/identd_socket.hpp +++ b/src/identd/identd_socket.hpp @@ -17,7 +17,7 @@ class TcpSocketServer; class IdentdSocket: public TCPSocketHandler { public: - IdentdSocket(std::shared_ptr poller, const socket_t socket, TcpSocketServer& server); + IdentdSocket(std::shared_ptr& poller, const socket_t socket, TcpSocketServer& server); ~IdentdSocket() = default; std::string generate_answer(const BiboumiComponent& biboumi, uint16_t local, uint16_t remote); -- cgit v1.2.3