mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
refactor: Use C++11 range based for loops to simplify rpc code
This commit is contained in:
parent
fa459bdc87
commit
fa89ca9b5b
6 changed files with 17 additions and 22 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue