mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +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
|
|
@ -1200,7 +1200,7 @@ static const CRPCCommand commands[] =
|
|||
{ "hidden", "estimaterawfee", &estimaterawfee, {"conf_target", "threshold"} },
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++)
|
||||
t.appendCommand(commands[vcidx].name, &commands[vcidx]);
|
||||
for (const auto& c : commands) {
|
||||
t.appendCommand(c.name, &c);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue