From 1676388fca891f4750b000df7e90e82779b43ef6 Mon Sep 17 00:00:00 2001 From: Kevin Kreiser Date: Tue, 29 Jun 2021 11:19:03 -0400 Subject: [PATCH] breakfix for ODR if you include this header in multiple compilation units you will violate the ODR and your compiler will tell you that its multiply defined. we inline it to fix this like the rest of the library --- include/cpp-statsd-client/StatsdClient.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/cpp-statsd-client/StatsdClient.hpp b/include/cpp-statsd-client/StatsdClient.hpp index 1f5a978..2aa02b6 100644 --- a/include/cpp-statsd-client/StatsdClient.hpp +++ b/include/cpp-statsd-client/StatsdClient.hpp @@ -153,7 +153,7 @@ class StatsdClient { }; namespace detail { -std::string sanitizePrefix(std::string prefix) { +inline std::string sanitizePrefix(std::string prefix) { // For convenience we provide the dot when generating the stat message if (!prefix.empty() && prefix.back() == '.') { prefix.pop_back();