From 86e288853b68cb1f0a8d59f66830e7b1f59a366e Mon Sep 17 00:00:00 2001 From: Benny Baumann <BenBE@geshi.org> Date: Sun, 12 Feb 2023 23:35:25 +0100 Subject: [PATCH] chg: Move connection_client ctor/dtor to header --- src/net/connection_client.cpp | 12 ------------ src/net/connection_client.hpp | 6 ++++-- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/src/net/connection_client.cpp b/src/net/connection_client.cpp index ca1ca07..d060b0a 100644 --- a/src/net/connection_client.cpp +++ b/src/net/connection_client.cpp @@ -6,15 +6,3 @@ */ #include "net/connection_client.hpp" - -namespace rmrf::net { - -connection_client::connection_client() : in_data_cb{} { - // Nothing to do here -} - -inline void connection_client::set_incomming_data_callback(const incomming_data_cb &cb) { - this->in_data_cb = cb; -} - -} diff --git a/src/net/connection_client.hpp b/src/net/connection_client.hpp index 8036375..c64aca9 100644 --- a/src/net/connection_client.hpp +++ b/src/net/connection_client.hpp @@ -21,7 +21,7 @@ protected: incomming_data_cb in_data_cb; public: - connection_client(); + connection_client() : in_data_cb{} {}; /** * Use this method to send data to the other endpoint. @@ -33,7 +33,9 @@ public: * called when the client got data to process. * @param cb The callback function to register [void(std::string data)] */ - void set_incomming_data_callback(const incomming_data_cb &cb); + inline void set_incomming_data_callback(const incomming_data_cb &cb) { + this->in_data_cb = cb; + }; }; } -- GitLab