aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoin-wallet.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2019-10-28 13:30:20 +0100
committerWladimir J. van der Laan <laanwj@protonmail.com>2019-10-28 13:31:33 +0100
commitc72906dcc11a73fa06a0adf97557fa756b551bee (patch)
tree2cfc335a4d7a75a0bbf20b8d49f04f987ec7266f /src/bitcoin-wallet.cpp
parenta25945318fdc2890a141a28843c2c5af251c9605 (diff)
downloadbitcoin-c72906dcc11a73fa06a0adf97557fa756b551bee.tar.xz
refactor: Remove redundant c_str() calls in formatting
Our formatter, tinyformat, *never* needs `c_str()` for strings. Remove redundant `c_str()` calls for: - `strprintf` - `LogPrintf` - `tfm::format`
Diffstat (limited to 'src/bitcoin-wallet.cpp')
-rw-r--r--src/bitcoin-wallet.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bitcoin-wallet.cpp b/src/bitcoin-wallet.cpp
index eda4f8ce78..917ecd71c5 100644
--- a/src/bitcoin-wallet.cpp
+++ b/src/bitcoin-wallet.cpp
@@ -36,7 +36,7 @@ static bool WalletAppInit(int argc, char* argv[])
SetupWalletToolArgs();
std::string error_message;
if (!gArgs.ParseParameters(argc, argv, error_message)) {
- tfm::format(std::cerr, "Error parsing command line arguments: %s\n", error_message.c_str());
+ tfm::format(std::cerr, "Error parsing command line arguments: %s\n", error_message);
return false;
}
if (argc < 2 || HelpRequested(gArgs)) {
@@ -48,7 +48,7 @@ static bool WalletAppInit(int argc, char* argv[])
" bitcoin-wallet [options] <command>\n\n" +
gArgs.GetHelpMessage();
- tfm::format(std::cout, "%s", usage.c_str());
+ tfm::format(std::cout, "%s", usage);
return false;
}
@@ -56,7 +56,7 @@ static bool WalletAppInit(int argc, char* argv[])
LogInstance().m_print_to_console = gArgs.GetBoolArg("-printtoconsole", gArgs.GetBoolArg("-debug", false));
if (!CheckDataDirOption()) {
- tfm::format(std::cerr, "Error: Specified data directory \"%s\" does not exist.\n", gArgs.GetArg("-datadir", "").c_str());
+ tfm::format(std::cerr, "Error: Specified data directory \"%s\" does not exist.\n", gArgs.GetArg("-datadir", ""));
return false;
}
// Check for -testnet or -regtest parameter (Params() calls are only valid after this clause)
@@ -87,7 +87,7 @@ int main(int argc, char* argv[])
for(int i = 1; i < argc; ++i) {
if (!IsSwitchChar(argv[i][0])) {
if (!method.empty()) {
- tfm::format(std::cerr, "Error: two methods provided (%s and %s). Only one method should be provided.\n", method.c_str(), argv[i]);
+ tfm::format(std::cerr, "Error: two methods provided (%s and %s). Only one method should be provided.\n", method, argv[i]);
return EXIT_FAILURE;
}
method = argv[i];