mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-11 09:42:17 +01:00
refactor: Use C++11 range based for loops to simplify rpc code
This commit is contained in:
@@ -256,13 +256,8 @@ static const CRPCCommand vRPCCommands[] =
|
||||
|
||||
CRPCTable::CRPCTable()
|
||||
{
|
||||
unsigned int vcidx;
|
||||
for (vcidx = 0; vcidx < (sizeof(vRPCCommands) / sizeof(vRPCCommands[0])); vcidx++)
|
||||
{
|
||||
const CRPCCommand *pcmd;
|
||||
|
||||
pcmd = &vRPCCommands[vcidx];
|
||||
mapCommands[pcmd->name].push_back(pcmd);
|
||||
for (const auto& c : vRPCCommands) {
|
||||
appendCommand(c.name, &c);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user