Skip to content

Commit 7fcac96

Browse files
mzumsandeMacroFake
authored and
MacroFake
committed
rpc: Capture potentially large UniValue by ref for rpcdoccheck
Github-Pull: 25237 Rebased-From: 20ff499
1 parent 42af959 commit 7fcac96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rpc/util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ UniValue RPCHelpMan::HandleRequest(const JSONRPCRequest& request) const
573573
throw std::runtime_error(ToString());
574574
}
575575
const UniValue ret = m_fun(*this, request);
576-
CHECK_NONFATAL(std::any_of(m_results.m_results.begin(), m_results.m_results.end(), [ret](const RPCResult& res) { return res.MatchesType(ret); }));
576+
CHECK_NONFATAL(std::any_of(m_results.m_results.begin(), m_results.m_results.end(), [&ret](const RPCResult& res) { return res.MatchesType(ret); }));
577577
return ret;
578578
}
579579

0 commit comments

Comments
 (0)