mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-01 11:26:03 +02:00
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`
This commit is contained in:
@@ -36,7 +36,7 @@ int main(int argc, char** argv)
|
||||
SetupBenchArgs();
|
||||
std::string error;
|
||||
if (!gArgs.ParseParameters(argc, argv, error)) {
|
||||
tfm::format(std::cerr, "Error parsing command line arguments: %s\n", error.c_str());
|
||||
tfm::format(std::cerr, "Error parsing command line arguments: %s\n", error);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ int main(int argc, char** argv)
|
||||
|
||||
double scaling_factor;
|
||||
if (!ParseDouble(scaling_str, &scaling_factor)) {
|
||||
tfm::format(std::cerr, "Error parsing scaling factor as double: %s\n", scaling_str.c_str());
|
||||
tfm::format(std::cerr, "Error parsing scaling factor as double: %s\n", scaling_str);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user