Skip to content

Commit 788883f

Browse files
committed
Merge bitcoin#25963: CBlockLocator: performance-move-const-arg Clang tidy fixup
6b24dfe CBlockLocator: performance-move-const-arg Clang tidy fixups (Jon Atack) Pull request description: Fix Clang-tidy CI errors on master. See https://cirrus-ci.com/task/4806752200818688?logs=ci#L4696 for an example. ACKs for top commit: MarcoFalke: review ACK 6b24dfe vasild: ACK 6b24dfe Tree-SHA512: 7a67acf7b42da07b63fbb392236e9a7be8cf35c36e37ca980c4467fe8295c2eda8aef10f41a1e3036cd9ebece47fa957fc3256033f853bd6a97ce2ca42799a0a
1 parent 35c7990 commit 788883f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/chain.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ CBlockLocator CChain::GetLocator(const CBlockIndex *pindex) const {
5454
nStep *= 2;
5555
}
5656

57-
return CBlockLocator(vHave);
57+
return CBlockLocator(std::move(vHave));
5858
}
5959

6060
const CBlockIndex *CChain::FindFork(const CBlockIndex *pindex) const {

‎src/primitives/block.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ struct CBlockLocator
242242

243243
CBlockLocator() {}
244244

245-
explicit CBlockLocator(const std::vector<uint256>& vHaveIn) : vHave(vHaveIn) {}
245+
explicit CBlockLocator(std::vector<uint256>&& have) : vHave(std::move(have)) {}
246246

247247
SERIALIZE_METHODS(CBlockLocator, obj)
248248
{

0 commit comments

Comments
 (0)