mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-08 21:59:10 +02:00
clang-tidy: Add performance-no-automatic-move check
https://clang.llvm.org/extra/clang-tidy/checks/performance/no-automatic-move.html
This commit is contained in:
@@ -211,7 +211,7 @@ FUZZ_TARGET_INIT(tx_pool_standard, initialize_tx_pool)
|
||||
for (int i = 0; i < num_out; ++i) {
|
||||
tx_mut.vout.emplace_back(amount_out, P2WSH_OP_TRUE);
|
||||
}
|
||||
const auto tx = MakeTransactionRef(tx_mut);
|
||||
auto tx = MakeTransactionRef(tx_mut);
|
||||
// Restore previously removed outpoints
|
||||
for (const auto& in : tx->vin) {
|
||||
Assert(outpoints_rbf.insert(in.prevout).second);
|
||||
|
||||
@@ -69,7 +69,7 @@ FUZZ_TARGET_INIT(txorphan, initialize_orphanage)
|
||||
for (auto& in : tx_mut.vin) {
|
||||
outpoints.push_back(in.prevout);
|
||||
}
|
||||
const auto new_tx = MakeTransactionRef(tx_mut);
|
||||
auto new_tx = MakeTransactionRef(tx_mut);
|
||||
// add newly constructed transaction to outpoints
|
||||
for (uint32_t i = 0; i < num_out; i++) {
|
||||
outpoints.emplace_back(new_tx->GetHash(), i);
|
||||
|
||||
@@ -321,7 +321,7 @@ CBlock TestChain100Setup::CreateAndProcessBlock(
|
||||
chainstate = &Assert(m_node.chainman)->ActiveChainstate();
|
||||
}
|
||||
|
||||
const CBlock block = this->CreateBlock(txns, scriptPubKey, *chainstate);
|
||||
CBlock block = this->CreateBlock(txns, scriptPubKey, *chainstate);
|
||||
std::shared_ptr<const CBlock> shared_pblock = std::make_shared<const CBlock>(block);
|
||||
Assert(m_node.chainman)->ProcessNewBlock(shared_pblock, true, true, nullptr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user