Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/server.cpp
Show First 20 Lines • Show All 217 Lines • ▼ Show 20 Lines | |||||
std::string CRPCTable::help(Config &config, const std::string &strCommand, | std::string CRPCTable::help(Config &config, const std::string &strCommand, | ||||
const JSONRPCRequest &helpreq) const { | const JSONRPCRequest &helpreq) const { | ||||
std::string strRet; | std::string strRet; | ||||
std::string category; | std::string category; | ||||
std::set<const ContextFreeRPCCommand *> setDone; | std::set<const ContextFreeRPCCommand *> setDone; | ||||
std::vector<std::pair<std::string, const ContextFreeRPCCommand *>> | std::vector<std::pair<std::string, const ContextFreeRPCCommand *>> | ||||
vCommands; | vCommands; | ||||
for (std::map<std::string, const ContextFreeRPCCommand *>::const_iterator | for (const auto &entry : mapCommands) { | ||||
mi = mapCommands.begin(); | |||||
mi != mapCommands.end(); ++mi) { | |||||
vCommands.push_back( | vCommands.push_back( | ||||
std::make_pair(mi->second->category + mi->first, mi->second)); | std::make_pair(entry.second->category + entry.first, entry.second)); | ||||
} | } | ||||
sort(vCommands.begin(), vCommands.end()); | sort(vCommands.begin(), vCommands.end()); | ||||
JSONRPCRequest jreq(helpreq); | JSONRPCRequest jreq(helpreq); | ||||
jreq.fHelp = true; | jreq.fHelp = true; | ||||
jreq.params = UniValue(); | jreq.params = UniValue(); | ||||
for (const std::pair<std::string, const ContextFreeRPCCommand *> &command : | for (const std::pair<std::string, const ContextFreeRPCCommand *> &command : | ||||
▲ Show 20 Lines • Show All 373 Lines • Show Last 20 Lines |