use const references where appropriate
This commit is contained in:
committed by
Jack Grigg
parent
5e478618e6
commit
db954a65ac
@@ -177,7 +177,7 @@ vector<unsigned char> ParseHexO(const UniValue& o, string strKey)
|
||||
* Note: This interface may still be subject to change.
|
||||
*/
|
||||
|
||||
string CRPCTable::help(string strCommand) const
|
||||
std::string CRPCTable::help(const std::string& strCommand) const
|
||||
{
|
||||
string strRet;
|
||||
string category;
|
||||
@@ -419,7 +419,7 @@ CRPCTable::CRPCTable()
|
||||
}
|
||||
}
|
||||
|
||||
const CRPCCommand *CRPCTable::operator[](string name) const
|
||||
const CRPCCommand *CRPCTable::operator[](const std::string& name) const
|
||||
{
|
||||
map<string, const CRPCCommand*>::const_iterator it = mapCommands.find(name);
|
||||
if (it == mapCommands.end())
|
||||
@@ -1071,11 +1071,13 @@ UniValue CRPCTable::execute(const std::string &strMethod, const UniValue ¶ms
|
||||
g_rpcSignals.PostCommand(*pcmd);
|
||||
}
|
||||
|
||||
std::string HelpExampleCli(string methodname, string args){
|
||||
std::string HelpExampleCli(const std::string& methodname, const std::string& args)
|
||||
{
|
||||
return "> zcash-cli " + methodname + " " + args + "\n";
|
||||
}
|
||||
|
||||
std::string HelpExampleRpc(string methodname, string args){
|
||||
std::string HelpExampleRpc(const std::string& methodname, const std::string& args)
|
||||
{
|
||||
return "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", "
|
||||
"\"method\": \"" + methodname + "\", \"params\": [" + args + "] }' -H 'content-type: text/plain;' http://127.0.0.1:8232/\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user