From 7fcac96597218691724002c2b8ecb3dbcf60bf06 Mon Sep 17 00:00:00 2001 From: Martin Zumsande Date: Sun, 29 May 2022 14:36:53 +0200 Subject: rpc: Capture potentially large UniValue by ref for rpcdoccheck Github-Pull: 25237 Rebased-From: 20ff4991e548630d7bb5e491fa4d69ec49369872 --- src/rpc/util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3