diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-07-15 21:29:41 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-08-02 21:32:36 +0200 |
commit | fa89ca9b5bd334813fd7e7edb202c56b35076e8d (patch) | |
tree | bb160f22ce43ace7f87a76de050e222f13a24758 /src/rpc/misc.cpp | |
parent | fa459bdc87bbb050ca1c8d469023a96ed798540e (diff) |
refactor: Use C++11 range based for loops to simplify rpc code
Diffstat (limited to 'src/rpc/misc.cpp')
-rw-r--r-- | src/rpc/misc.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index 53d38f4e11..eee6f79437 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -619,7 +619,7 @@ static const CRPCCommand commands[] = { "hidden", "echojson", &echo, {"arg0","arg1","arg2","arg3","arg4","arg5","arg6","arg7","arg8","arg9"}}, }; // 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); + } } |