mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 15:04:44 +01:00
util: Remove unused itostr
This commit is contained in:
parent
e3154aacf4
commit
fac96fff62
5 changed files with 4 additions and 14 deletions
|
@ -13,9 +13,9 @@
|
||||||
#include <util/strencodings.h>
|
#include <util/strencodings.h>
|
||||||
#include <util/threadnames.h>
|
#include <util/threadnames.h>
|
||||||
|
|
||||||
#include <system_error>
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
#include <system_error>
|
||||||
|
|
||||||
#ifdef DEBUG_LOCKCONTENTION
|
#ifdef DEBUG_LOCKCONTENTION
|
||||||
#if !defined(HAVE_THREAD_LOCAL)
|
#if !defined(HAVE_THREAD_LOCAL)
|
||||||
|
@ -57,7 +57,7 @@ struct CLockLocation {
|
||||||
{
|
{
|
||||||
return strprintf(
|
return strprintf(
|
||||||
"%s %s:%s%s (in thread %s)",
|
"%s %s:%s%s (in thread %s)",
|
||||||
mutexName, sourceFile, itostr(sourceLine), (fTry ? " (TRY)" : ""), m_thread_name);
|
mutexName, sourceFile, sourceLine, (fTry ? " (TRY)" : ""), m_thread_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Name() const
|
std::string Name() const
|
||||||
|
|
|
@ -97,7 +97,6 @@ void test_one_input(const std::vector<uint8_t>& buffer)
|
||||||
(void)IsDigit(ch);
|
(void)IsDigit(ch);
|
||||||
(void)IsSpace(ch);
|
(void)IsSpace(ch);
|
||||||
(void)IsSwitchChar(ch);
|
(void)IsSwitchChar(ch);
|
||||||
(void)itostr(i32);
|
|
||||||
(void)memusage::DynamicUsage(ch);
|
(void)memusage::DynamicUsage(ch);
|
||||||
(void)memusage::DynamicUsage(i16);
|
(void)memusage::DynamicUsage(i16);
|
||||||
(void)memusage::DynamicUsage(i32);
|
(void)memusage::DynamicUsage(i32);
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#include <test/fuzz/fuzz.h>
|
|
||||||
#include <test/fuzz/FuzzedDataProvider.h>
|
#include <test/fuzz/FuzzedDataProvider.h>
|
||||||
|
#include <test/fuzz/fuzz.h>
|
||||||
#include <tinyformat.h>
|
#include <tinyformat.h>
|
||||||
#include <util/strencodings.h>
|
#include <util/strencodings.h>
|
||||||
|
|
||||||
|
@ -56,7 +56,6 @@ void test_one_input(const std::vector<uint8_t>& buffer)
|
||||||
const int64_t random_int64 = fuzzed_data_provider.ConsumeIntegral<int64_t>();
|
const int64_t random_int64 = fuzzed_data_provider.ConsumeIntegral<int64_t>();
|
||||||
const std::string i64tostr_without_locale = i64tostr(random_int64);
|
const std::string i64tostr_without_locale = i64tostr(random_int64);
|
||||||
const int32_t random_int32 = fuzzed_data_provider.ConsumeIntegral<int32_t>();
|
const int32_t random_int32 = fuzzed_data_provider.ConsumeIntegral<int32_t>();
|
||||||
const std::string itostr_without_locale = itostr(random_int32);
|
|
||||||
const std::string strprintf_int_without_locale = strprintf("%d", random_int64);
|
const std::string strprintf_int_without_locale = strprintf("%d", random_int64);
|
||||||
const double random_double = fuzzed_data_provider.ConsumeFloatingPoint<double>();
|
const double random_double = fuzzed_data_provider.ConsumeFloatingPoint<double>();
|
||||||
const std::string strprintf_double_without_locale = strprintf("%f", random_double);
|
const std::string strprintf_double_without_locale = strprintf("%f", random_double);
|
||||||
|
@ -84,8 +83,6 @@ void test_one_input(const std::vector<uint8_t>& buffer)
|
||||||
assert(atoi_without_locale == atoi_with_locale);
|
assert(atoi_without_locale == atoi_with_locale);
|
||||||
const std::string i64tostr_with_locale = i64tostr(random_int64);
|
const std::string i64tostr_with_locale = i64tostr(random_int64);
|
||||||
assert(i64tostr_without_locale == i64tostr_with_locale);
|
assert(i64tostr_without_locale == i64tostr_with_locale);
|
||||||
const std::string itostr_with_locale = itostr(random_int32);
|
|
||||||
assert(itostr_without_locale == itostr_with_locale);
|
|
||||||
const std::string strprintf_int_with_locale = strprintf("%d", random_int64);
|
const std::string strprintf_int_with_locale = strprintf("%d", random_int64);
|
||||||
assert(strprintf_int_without_locale == strprintf_int_with_locale);
|
assert(strprintf_int_without_locale == strprintf_int_with_locale);
|
||||||
const std::string strprintf_double_with_locale = strprintf("%f", random_double);
|
const std::string strprintf_double_with_locale = strprintf("%f", random_double);
|
||||||
|
|
|
@ -412,11 +412,6 @@ std::string i64tostr(int64_t n)
|
||||||
return strprintf("%d", n);
|
return strprintf("%d", n);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string itostr(int n)
|
|
||||||
{
|
|
||||||
return strprintf("%d", n);
|
|
||||||
}
|
|
||||||
|
|
||||||
int64_t atoi64(const char* psz)
|
int64_t atoi64(const char* psz)
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
|
@ -56,7 +56,6 @@ std::string EncodeBase32(const std::string& str);
|
||||||
|
|
||||||
void SplitHostPort(std::string in, int& portOut, std::string& hostOut);
|
void SplitHostPort(std::string in, int& portOut, std::string& hostOut);
|
||||||
std::string i64tostr(int64_t n);
|
std::string i64tostr(int64_t n);
|
||||||
std::string itostr(int n);
|
|
||||||
int64_t atoi64(const char* psz);
|
int64_t atoi64(const char* psz);
|
||||||
int64_t atoi64(const std::string& str);
|
int64_t atoi64(const std::string& str);
|
||||||
int atoi(const std::string& str);
|
int atoi(const std::string& str);
|
||||||
|
|
Loading…
Add table
Reference in a new issue