@@ -36,25 +36,25 @@ class StatsdClient {
3636 // !@{
3737
3838 // ! Sets a configuration { host, port, prefix }
39- inline void setConfig (const std::string& host, const uint16_t port, const std::string& prefix) noexcept ;
39+ void setConfig (const std::string& host, const uint16_t port, const std::string& prefix) noexcept ;
4040
4141 // ! Returns the error message as an optional std::string
42- inline std::optional<std::string> errorMessage () const noexcept ;
42+ std::optional<std::string> errorMessage () const noexcept ;
4343
4444 // ! Increments the key, at a given frequency rate
45- inline void increment (const std::string& key, const float frequency = 1 .0f ) const noexcept ;
45+ void increment (const std::string& key, const float frequency = 1 .0f ) const noexcept ;
4646
4747 // ! Increments the key, at a given frequency rate
48- inline void decrement (const std::string& key, const float frequency = 1 .0f ) const noexcept ;
48+ void decrement (const std::string& key, const float frequency = 1 .0f ) const noexcept ;
4949
5050 // ! Adjusts the specified key by a given delta, at a given frequency rate
51- inline void count (const std::string& key, const int delta, const float frequency = 1 .0f ) const noexcept ;
51+ void count (const std::string& key, const int delta, const float frequency = 1 .0f ) const noexcept ;
5252
5353 // ! Records a gauge for the key, with a given value, at a given frequency rate
54- inline void gauge (const std::string& key, const unsigned int value, const float frequency = 1 .0f ) const noexcept ;
54+ void gauge (const std::string& key, const unsigned int value, const float frequency = 1 .0f ) const noexcept ;
5555
5656 // ! Records a timing for a key, at a given frequency
57- inline void timing (const std::string& key, const unsigned int ms, const float frequency = 1 .0f ) const noexcept ;
57+ void timing (const std::string& key, const unsigned int ms, const float frequency = 1 .0f ) const noexcept ;
5858
5959 // ! Send a value for a key, according to its type, at a given frequency
6060 void send (const std::string& key, const int value, const std::string& type, const float frequency = 1 .0f ) const
@@ -70,7 +70,7 @@ class StatsdClient {
7070 mutable UDPSender m_sender;
7171};
7272
73- StatsdClient::StatsdClient (const std::string& host,
73+ inline StatsdClient::StatsdClient (const std::string& host,
7474 const uint16_t port,
7575 const std::string& prefix,
7676 const std::optional<uint64_t > batchsize) noexcept
@@ -79,36 +79,36 @@ StatsdClient::StatsdClient(const std::string& host,
7979 std::srand (time (nullptr ));
8080}
8181
82- void StatsdClient::setConfig (const std::string& host, const uint16_t port, const std::string& prefix) noexcept {
82+ inline void StatsdClient::setConfig (const std::string& host, const uint16_t port, const std::string& prefix) noexcept {
8383 m_prefix = prefix;
8484 m_sender.setConfig (host, port);
8585}
8686
87- std::optional<std::string> StatsdClient::errorMessage () const noexcept {
87+ inline std::optional<std::string> StatsdClient::errorMessage () const noexcept {
8888 return m_sender.errorMessage ();
8989}
9090
91- void StatsdClient::decrement (const std::string& key, const float frequency) const noexcept {
91+ inline void StatsdClient::decrement (const std::string& key, const float frequency) const noexcept {
9292 return count (key, -1 , frequency);
9393}
9494
95- void StatsdClient::increment (const std::string& key, const float frequency) const noexcept {
95+ inline void StatsdClient::increment (const std::string& key, const float frequency) const noexcept {
9696 return count (key, 1 , frequency);
9797}
9898
99- void StatsdClient::count (const std::string& key, const int delta, const float frequency) const noexcept {
99+ inline void StatsdClient::count (const std::string& key, const int delta, const float frequency) const noexcept {
100100 return send (key, delta, " c" , frequency);
101101}
102102
103- void StatsdClient::gauge (const std::string& key, const unsigned int value, const float frequency) const noexcept {
103+ inline void StatsdClient::gauge (const std::string& key, const unsigned int value, const float frequency) const noexcept {
104104 return send (key, value, " g" , frequency);
105105}
106106
107- void StatsdClient::timing (const std::string& key, const unsigned int ms, const float frequency) const noexcept {
107+ inline void StatsdClient::timing (const std::string& key, const unsigned int ms, const float frequency) const noexcept {
108108 return send (key, ms, " ms" , frequency);
109109}
110110
111- void StatsdClient::send (const std::string& key, const int value, const std::string& type, const float frequency) const
111+ inline void StatsdClient::send (const std::string& key, const int value, const std::string& type, const float frequency) const
112112 noexcept {
113113 const auto isFrequencyOne = [](const float frequency) noexcept {
114114 constexpr float epsilon{0 .0001f };
0 commit comments