From b7e7837d763a81c4b8110704d9a8a65c5dec577c Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant Date: Sun, 22 Mar 2020 19:43:43 -0700 Subject: [PATCH] fix simple compile error --- ixbots/ixbots/IXStatsdClient.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/ixbots/ixbots/IXStatsdClient.cpp b/ixbots/ixbots/IXStatsdClient.cpp index c9d86e6a..8513cf5c 100644 --- a/ixbots/ixbots/IXStatsdClient.cpp +++ b/ixbots/ixbots/IXStatsdClient.cpp @@ -45,9 +45,9 @@ namespace ix { - StatsdClient::StatsdClient(const string& host, + StatsdClient::StatsdClient(const std::string& host, int port, - const string& prefix) + const std::string& prefix) : _host(host) , _port(port) , _prefix(prefix) @@ -89,42 +89,42 @@ namespace ix } /* will change the original string */ - void StatsdClient::cleanup(string& key) + void StatsdClient::cleanup(std::string& key) { size_t pos = key.find_first_of(":|@"); - while (pos != string::npos) + while (pos != std::string::npos) { key[pos] = '_'; pos = key.find_first_of(":|@"); } } - int StatsdClient::dec(const string& key) + int StatsdClient::dec(const std::string& key) { return count(key, -1); } - int StatsdClient::inc(const string& key) + int StatsdClient::inc(const std::string& key) { return count(key, 1); } - int StatsdClient::count(const string& key, size_t value) + int StatsdClient::count(const std::string& key, size_t value) { return send(key, value, "c"); } - int StatsdClient::gauge(const string& key, size_t value) + int StatsdClient::gauge(const std::string& key, size_t value) { return send(key, value, "g"); } - int StatsdClient::timing(const string& key, size_t ms) + int StatsdClient::timing(const std::string& key, size_t ms) { return send(key, ms, "ms"); } - int StatsdClient::send(string key, size_t value, const string &type) + int StatsdClient::send(std::string key, size_t value, const std::string &type) { cleanup(key); @@ -135,7 +135,7 @@ namespace ix return send(buf); } - int StatsdClient::send(const string &message) + int StatsdClient::send(const std::string &message) { std::lock_guard lock(_mutex);