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 11// Copyright (c) 2010 Satoshi Nakamoto
2- // Copyright (c) 2009-2022 The Bitcoin Core developers
2+ // Copyright (c) 2009-present The Bitcoin Core developers
33// Distributed under the MIT software license, see the accompanying
44// file COPYING or http://www.opensource.org/licenses/mit-license.php.
55
2121#include < util/time.h>
2222#include < validation.h>
2323
24+ #include < algorithm>
2425#include < cassert>
2526#include < chrono>
2627#include < memory>
@@ -79,15 +80,13 @@ std::string CRPCTable::help(const std::string& strCommand, const JSONRPCRequest&
7980
8081 for (const auto & entry : mapCommands)
8182 vCommands.emplace_back (entry.second .front ()->category + entry.first , entry.second .front ());
82- sort (vCommands. begin (), vCommands. end () );
83+ std::ranges:: sort (vCommands);
8384
8485 JSONRPCRequest jreq = helpreq;
8586 jreq.mode = JSONRPCRequest::GET_HELP;
8687 jreq.params = UniValue ();
8788
88- for (const std::pair<std::string, const CRPCCommand*>& command : vCommands)
89- {
90- const CRPCCommand *pcmd = command.second ;
89+ for (const auto & [_, pcmd] : vCommands) {
9190 std::string strMethod = pcmd->name ;
9291 if ((strCommand != " " || pcmd->category == " hidden" ) && strMethod != strCommand)
9392 continue ;
You can’t perform that action at this time.
0 commit comments