diff options
| author | MarcoFalke <[email protected]> | 2020-07-15 21:29:41 +0200 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2020-08-02 21:32:36 +0200 |
| commit | fa89ca9b5bd334813fd7e7edb202c56b35076e8d (patch) | |
| tree | bb160f22ce43ace7f87a76de050e222f13a24758 /src/rpc/mining.cpp | |
| parent | rpc: Treat all args after a hidden arg as hidden as well (diff) | |
| download | discoin-fa89ca9b5bd334813fd7e7edb202c56b35076e8d.tar.xz discoin-fa89ca9b5bd334813fd7e7edb202c56b35076e8d.zip | |
refactor: Use C++11 range based for loops to simplify rpc code
Diffstat (limited to 'src/rpc/mining.cpp')
| -rw-r--r-- | src/rpc/mining.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index fee6a893e..c357d6f5b 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -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); + } } |