diff options
author | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-01-11 16:18:28 +0100 |
---|---|---|
committer | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-01-11 16:18:34 +0100 |
commit | 9887fc789886b356efc6818783cabaab2b14481f (patch) | |
tree | 892c0f2ba14ce0e03d1326c369dc1bbc1c8b8778 /src/test/fuzz | |
parent | b168b71a5d30c1441737cace281ffa3cce0357fc (diff) | |
parent | 9567bfeab95cc0932073641dd162903850987d43 (diff) |
Merge bitcoin/bitcoin#26758: refactor: Add `performance-no-automatic-move` clang-tidy check
9567bfeab95cc0932073641dd162903850987d43 clang-tidy: Add `performance-no-automatic-move` check (Hennadii Stepanov)
Pull request description:
Split from bitcoin/bitcoin#26642 as [requested](https://github.com/bitcoin/bitcoin/pull/26642#discussion_r1054673201).
For the problem description see https://clang.llvm.org/extra/clang-tidy/checks/performance/no-automatic-move.html.
The following types are affected:
- `std::pair<CAddress, NodeSeconds>`
- `std::vector<CAddress>`
- `UniValue`, also see bitcoin/bitcoin#25429
- `QColor`
- `CBlock`
- `MempoolAcceptResult`
- `std::shared_ptr<CWallet>`
- `std::optional<SelectionResult>`
- `CTransactionRef`, which is `std::shared_ptr<const CTransaction>`
ACKs for top commit:
andrewtoth:
ACK 9567bfeab95cc0932073641dd162903850987d43
aureleoules:
ACK 9567bfeab95cc0932073641dd162903850987d43
Tree-SHA512: 9b6a5d539205b41d2c86402d384318ed2e1d89e66333ebd200a48fd7df3ce6f6c60a3e989eda5cc503fb34b8d82526f95e56776e1af51e63b49e3a1fef72dbcb
Diffstat (limited to 'src/test/fuzz')
-rw-r--r-- | src/test/fuzz/tx_pool.cpp | 2 | ||||
-rw-r--r-- | src/test/fuzz/txorphan.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/test/fuzz/tx_pool.cpp b/src/test/fuzz/tx_pool.cpp index fc5b13095e..e933167341 100644 --- a/src/test/fuzz/tx_pool.cpp +++ b/src/test/fuzz/tx_pool.cpp @@ -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); diff --git a/src/test/fuzz/txorphan.cpp b/src/test/fuzz/txorphan.cpp index 02743051e8..dafe8249c0 100644 --- a/src/test/fuzz/txorphan.cpp +++ b/src/test/fuzz/txorphan.cpp @@ -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); |