]> git.tdb.fi Git - libs/net.git/commitdiff
Hide Http::Server destructor in the library
authorMikko Rasa <tdb@tdb.fi>
Tue, 19 Apr 2016 07:31:27 +0000 (10:31 +0300)
committerMikko Rasa <tdb@tdb.fi>
Tue, 19 Apr 2016 07:31:27 +0000 (10:31 +0300)
Otherwise sigc::signal destructor will be emitted in the including file,
requiring explicit linking with libsigc++.

source/http/server.cpp
source/http/server.h

index ed3a2b9288339830ee89f0b56585960ddb24d398..9bdfa61ac153cb188ea4688ad5a911df4114f539 100644 (file)
@@ -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();
index e07ee55a2251a860652d98679ac0755ae25921d8..04c2d06b5cf6d386fa7d3f357036f3efaabba4df 100644 (file)
@@ -37,6 +37,8 @@ private:
 
 public:
        Server(unsigned);
+       ~Server();
+
        unsigned get_port() const;
        void use_event_dispatcher(IO::EventDispatcher *);
        void delay_response(Response &);