From f839e84e68924129a9fa5941ad82e4e9cc1def4d Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 19 Apr 2016 10:31:27 +0300 Subject: [PATCH] Hide Http::Server destructor in the library Otherwise sigc::signal destructor will be emitted in the including file, requiring explicit linking with libsigc++. --- source/http/server.cpp | 5 +++++ source/http/server.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/source/http/server.cpp b/source/http/server.cpp index ed3a2b9..9bdfa61 100644 --- a/source/http/server.cpp +++ b/source/http/server.cpp @@ -23,6 +23,11 @@ Server::Server(unsigned port): sock.listen(*addr, 8); } +// Avoid emitting sigc::signal destructor in files including server.h +Server::~Server() +{ +} + unsigned Server::get_port() const { const Net::SockAddr &addr = sock.get_local_address(); diff --git a/source/http/server.h b/source/http/server.h index e07ee55..04c2d06 100644 --- a/source/http/server.h +++ b/source/http/server.h @@ -37,6 +37,8 @@ private: public: Server(unsigned); + ~Server(); + unsigned get_port() const; void use_event_dispatcher(IO::EventDispatcher *); void delay_response(Response &); -- 2.43.0