diff options
author | Martin Zumsande <mzumsande@gmail.com> | 2022-05-29 14:36:53 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-05-30 10:46:02 +0200 |
commit | 7fcac96597218691724002c2b8ecb3dbcf60bf06 (patch) | |
tree | 425bb5b9a0fc77320a69e2a99c6d998b92fd463b /src | |
parent | 42af9596ce85a541988abee54eed8a9b271a46a1 (diff) |
rpc: Capture potentially large UniValue by ref for rpcdoccheck
Github-Pull: 25237
Rebased-From: 20ff4991e548630d7bb5e491fa4d69ec49369872
Diffstat (limited to 'src')
-rw-r--r-- | src/rpc/util.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rpc/util.cpp b/src/rpc/util.cpp index 2059628b54..76f63546da 100644 --- a/src/rpc/util.cpp +++ b/src/rpc/util.cpp @@ -573,7 +573,7 @@ UniValue RPCHelpMan::HandleRequest(const JSONRPCRequest& request) const throw std::runtime_error(ToString()); } const UniValue ret = m_fun(*this, request); - CHECK_NONFATAL(std::any_of(m_results.m_results.begin(), m_results.m_results.end(), [ret](const RPCResult& res) { return res.MatchesType(ret); })); + CHECK_NONFATAL(std::any_of(m_results.m_results.begin(), m_results.m_results.end(), [&ret](const RPCResult& res) { return res.MatchesType(ret); })); return ret; } |