File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1
1
// Copyright (c) 2010 Satoshi Nakamoto
2
- // Copyright (c) 2009-2022 The Bitcoin Core developers
2
+ // Copyright (c) 2009-present The Bitcoin Core developers
3
3
// Distributed under the MIT software license, see the accompanying
4
4
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
5
21
21
#include < util/time.h>
22
22
#include < validation.h>
23
23
24
+ #include < algorithm>
24
25
#include < cassert>
25
26
#include < chrono>
26
27
#include < memory>
@@ -79,15 +80,13 @@ std::string CRPCTable::help(const std::string& strCommand, const JSONRPCRequest&
79
80
80
81
for (const auto & entry : mapCommands)
81
82
vCommands.emplace_back (entry.second .front ()->category + entry.first , entry.second .front ());
82
- sort (vCommands. begin (), vCommands. end () );
83
+ std::ranges:: sort (vCommands);
83
84
84
85
JSONRPCRequest jreq = helpreq;
85
86
jreq.mode = JSONRPCRequest::GET_HELP;
86
87
jreq.params = UniValue ();
87
88
88
- for (const std::pair<std::string, const CRPCCommand*>& command : vCommands)
89
- {
90
- const CRPCCommand *pcmd = command.second ;
89
+ for (const auto & [_, pcmd] : vCommands) {
91
90
std::string strMethod = pcmd->name ;
92
91
if ((strCommand != " " || pcmd->category == " hidden" ) && strMethod != strCommand)
93
92
continue ;
You can’t perform that action at this time.
0 commit comments