mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
refactor: Make const refs vars where applicable
This avoids initializing variables with the copy-constructor of a non-trivially copyable type.
This commit is contained in:
@@ -686,7 +686,7 @@ static RPCHelpMan getblocktemplate()
|
||||
if (lpval.isStr())
|
||||
{
|
||||
// Format: <hashBestChain><nTransactionsUpdatedLast>
|
||||
std::string lpstr = lpval.get_str();
|
||||
const std::string& lpstr = lpval.get_str();
|
||||
|
||||
hashWatchedChain = ParseHashV(lpstr.substr(0, 64), "longpollid");
|
||||
nTransactionsUpdatedLastLP = LocaleIndependentAtoi<int64_t>(lpstr.substr(64));
|
||||
|
||||
Reference in New Issue
Block a user