From 6b24dfe24d2ed50ea0b06ce1919db3dc0e871a03 Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Wed, 31 Aug 2022 13:07:55 +0200 Subject: CBlockLocator: performance-move-const-arg Clang tidy fixups Co-authored-by: "Pieter Wuille " Co-authored-by: "Vasil Dimov " Co-authored-by: "MarcoFalke " --- src/chain.cpp | 2 +- src/primitives/block.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/chain.cpp b/src/chain.cpp index 19c35b5012..66a0830394 100644 --- a/src/chain.cpp +++ b/src/chain.cpp @@ -49,7 +49,7 @@ std::vector LocatorEntries(const CBlockIndex* index) CBlockLocator GetLocator(const CBlockIndex* index) { - return CBlockLocator{std::move(LocatorEntries(index))}; + return CBlockLocator{LocatorEntries(index)}; } CBlockLocator CChain::GetLocator() const diff --git a/src/primitives/block.h b/src/primitives/block.h index 76aba6c899..2e26e6c426 100644 --- a/src/primitives/block.h +++ b/src/primitives/block.h @@ -123,7 +123,7 @@ struct CBlockLocator CBlockLocator() {} - explicit CBlockLocator(const std::vector& vHaveIn) : vHave(vHaveIn) {} + explicit CBlockLocator(std::vector&& have) : vHave(std::move(have)) {} SERIALIZE_METHODS(CBlockLocator, obj) { -- cgit v1.2.3