From 20b1a197a841c29ccae587cb77d4ee16698236f4 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 13 Feb 2024 14:21:11 +0800 Subject: [PATCH] exporter: drop unused function string_is_digit() is not used, so drop it. `string_is_digit()` is not defined or used, so drop it as well. Signed-off-by: Kefu Chai --- src/exporter/util.cc | 8 -------- src/exporter/util.h | 2 -- 2 files changed, 10 deletions(-) diff --git a/src/exporter/util.cc b/src/exporter/util.cc index 9b5108390cb..e611c2a732e 100644 --- a/src/exporter/util.cc +++ b/src/exporter/util.cc @@ -35,14 +35,6 @@ void BlockTimer::stop() { } } -bool string_is_digit(std::string s) { - size_t i = 0; - while (std::isdigit(s[i]) && i < s.size()) { - i++; - } - return i >= s.size(); -} - std::string read_file_to_string(std::string path) { std::ifstream is(path); std::stringstream buffer; diff --git a/src/exporter/util.h b/src/exporter/util.h index 243568b14d2..66692c1a5b7 100644 --- a/src/exporter/util.h +++ b/src/exporter/util.h @@ -17,8 +17,6 @@ class BlockTimer { std::chrono::time_point t1, t2; }; -bool string_is_digit(std::string s); std::string read_file_to_string(std::string path); -std::string get_hostname(std::string path); void promethize(std::string &name); -- 2.39.5