summaryrefslogtreecommitdiff
path: root/src/identd
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2017-03-08 19:04:15 +0100
committerlouiz’ <louiz@louiz.org>2017-03-08 19:04:15 +0100
commitf0bc6c83a8eb548d0a3edbf7c16a6922bfd24ba5 (patch)
treec9df36ef6781dfa56d2a3fee5b68390aa1e9ceb5 /src/identd
parentcd92baae3f0de8b841b5bbfdb02e4fa95acd52c1 (diff)
downloadbiboumi-f0bc6c83a8eb548d0a3edbf7c16a6922bfd24ba5.tar.gz
biboumi-f0bc6c83a8eb548d0a3edbf7c16a6922bfd24ba5.tar.bz2
biboumi-f0bc6c83a8eb548d0a3edbf7c16a6922bfd24ba5.tar.xz
biboumi-f0bc6c83a8eb548d0a3edbf7c16a6922bfd24ba5.zip
Pass the shared_ptr by reference, to avoid useless copies
Diffstat (limited to 'src/identd')
-rw-r--r--src/identd/identd_server.hpp2
-rw-r--r--src/identd/identd_socket.cpp2
-rw-r--r--src/identd/identd_socket.hpp2
3 files changed, 3 insertions, 3 deletions
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<IdentdSocket>
{
public:
- IdentdServer(const BiboumiComponent& biboumi_component, std::shared_ptr<Poller> poller, const uint16_t port):
+ IdentdServer(const BiboumiComponent& biboumi_component, std::shared_ptr<Poller>& poller, const uint16_t port):
TcpSocketServer<IdentdSocket>(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 <logger/logger.hpp>
-IdentdSocket::IdentdSocket(std::shared_ptr<Poller> poller, const socket_t socket, TcpSocketServer<IdentdSocket>& server):
+IdentdSocket::IdentdSocket(std::shared_ptr<Poller>& poller, const socket_t socket, TcpSocketServer<IdentdSocket>& server):
TCPSocketHandler(poller),
server(dynamic_cast<IdentdServer&>(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> poller, const socket_t socket, TcpSocketServer<IdentdSocket>& server);
+ IdentdSocket(std::shared_ptr<Poller>& poller, const socket_t socket, TcpSocketServer<IdentdSocket>& server);
~IdentdSocket() = default;
std::string generate_answer(const BiboumiComponent& biboumi, uint16_t local, uint16_t remote);