@@ -105,7 +105,7 @@ static int AppInitRPC(int argc, char* argv[])
105105 SetupCliArgs ();
106106 std::string error;
107107 if (!gArgs .ParseParameters (argc, argv, error)) {
108- tfm::format (std::cerr, " Error parsing command line arguments: %s\n " , error. c_str () );
108+ tfm::format (std::cerr, " Error parsing command line arguments: %s\n " , error);
109109 return EXIT_FAILURE;
110110 }
111111 if (argc < 2 || HelpRequested (gArgs ) || gArgs .IsArgSet (" -version" )) {
@@ -119,19 +119,19 @@ static int AppInitRPC(int argc, char* argv[])
119119 strUsage += " \n " + gArgs .GetHelpMessage ();
120120 }
121121
122- tfm::format (std::cout, " %s" , strUsage. c_str () );
122+ tfm::format (std::cout, " %s" , strUsage);
123123 if (argc < 2 ) {
124124 tfm::format (std::cerr, " Error: too few parameters\n " );
125125 return EXIT_FAILURE;
126126 }
127127 return EXIT_SUCCESS;
128128 }
129129 if (!CheckDataDirOption ()) {
130- tfm::format (std::cerr, " Error: Specified data directory \" %s\" does not exist.\n " , gArgs .GetArg (" -datadir" , " " ). c_str () );
130+ tfm::format (std::cerr, " Error: Specified data directory \" %s\" does not exist.\n " , gArgs .GetArg (" -datadir" , " " ));
131131 return EXIT_FAILURE;
132132 }
133133 if (!gArgs .ReadConfigFiles (error, true )) {
134- tfm::format (std::cerr, " Error reading configuration file: %s\n " , error. c_str () );
134+ tfm::format (std::cerr, " Error reading configuration file: %s\n " , error);
135135 return EXIT_FAILURE;
136136 }
137137 // Check for -chain, -testnet or -regtest parameter (BaseParams() calls are only valid after this clause)
@@ -393,7 +393,7 @@ static UniValue CallRPC(BaseRequestHandler *rh, const std::string& strMethod, co
393393 if (failedToGetAuthCookie) {
394394 throw std::runtime_error (strprintf (
395395 " Could not locate RPC credentials. No authentication cookie could be found, and RPC password is not set. See -rpcpassword and -stdinrpcpass. Configuration file: (%s)" ,
396- GetConfigFile (gArgs .GetArg (" -conf" , BITCOIN_CONF_FILENAME)).string (). c_str () ));
396+ GetConfigFile (gArgs .GetArg (" -conf" , BITCOIN_CONF_FILENAME)).string ()));
397397 } else {
398398 throw std::runtime_error (" Authorization failed: Incorrect rpcuser or rpcpassword" );
399399 }
@@ -541,7 +541,7 @@ static int CommandLineRPC(int argc, char *argv[])
541541 }
542542
543543 if (strPrint != " " ) {
544- tfm::format (nRet == 0 ? std::cout : std::cerr, " %s\n " , strPrint. c_str () );
544+ tfm::format (nRet == 0 ? std::cout : std::cerr, " %s\n " , strPrint);
545545 }
546546 return nRet;
547547}
0 commit comments