diff --git a/src/chain.cpp b/src/chain.cpp index 19c35b50125..66a08303947 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 76aba6c8997..2e26e6c4263 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) {