From 686e92ef25c248d5c9cc06d2723b6a649fd385d5 Mon Sep 17 00:00:00 2001 From: svost Date: Tue, 19 Apr 2016 16:14:13 +0300 Subject: [PATCH] Just use std::to_string --- src/bitcoinrpc.cpp | 2 +- src/sync.cpp | 2 +- src/util.h | 5 ----- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index 0d8dfe9..adaa354 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -1126,7 +1126,7 @@ Object CallRPC(const string& strMethod, const Array& params) asio::ssl::stream sslStream(io_service, context); SSLIOStreamDevice d(sslStream, fUseSSL); iostreams::stream< SSLIOStreamDevice > stream(d); - if (!d.connect(GetArg("-rpcconnect", "127.0.0.1"), GetArg("-rpcport", itostr(GetDefaultRPCPort())))) + if (!d.connect(GetArg("-rpcconnect", "127.0.0.1"), GetArg("-rpcport", to_string(GetDefaultRPCPort())))) throw runtime_error("couldn't connect to server"); // HTTP basic authentication diff --git a/src/sync.cpp b/src/sync.cpp index 44cb125..8ab43e3 100644 --- a/src/sync.cpp +++ b/src/sync.cpp @@ -36,7 +36,7 @@ struct CLockLocation std::string ToString() const { - return mutexName+" "+sourceFile+":"+itostr(sourceLine); + return mutexName+" "+sourceFile+":"+std::to_string(sourceLine); } private: diff --git a/src/util.h b/src/util.h index e32a468..e778979 100644 --- a/src/util.h +++ b/src/util.h @@ -255,11 +255,6 @@ inline std::string i64tostr(int64_t n) return strprintf("%" PRId64, n); } -inline std::string itostr(int n) -{ - return strprintf("%d", n); -} - inline int64_t strtoll(const char* psz) { return strtoll(psz, NULL, 10); -- 1.7.1