clang-tidy: Add performance-no-automatic-move check

https://clang.llvm.org/extra/clang-tidy/checks/performance/no-automatic-move.html
This commit is contained in:
Hennadii Stepanov
2022-12-27 15:25:51 +00:00
parent e9262ea32a
commit 9567bfeab9
12 changed files with 19 additions and 17 deletions

View File

@@ -579,7 +579,7 @@ UniValue RPCHelpMan::HandleRequest(const JSONRPCRequest& request) const
if (request.mode == JSONRPCRequest::GET_HELP || !IsValidNumArgs(request.params.size())) {
throw std::runtime_error(ToString());
}
const UniValue ret = m_fun(*this, request);
UniValue ret = m_fun(*this, request);
if (gArgs.GetBoolArg("-rpcdoccheck", DEFAULT_RPC_DOC_CHECK)) {
CHECK_NONFATAL(std::any_of(m_results.m_results.begin(), m_results.m_results.end(), [&ret](const RPCResult& res) { return res.MatchesType(ret); }));
}