mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-09 12:12:41 +01:00
Merge bitcoin/bitcoin#31364: refactor: Fix remaining clang-tidy performance-unnecessary-copy-initialization errors
3305972f7brefactor: Fix remaining clang-tidy performance-unnecessary-copy-initialization errors (Lőrinc) Pull request description: A follow-up of https://github.com/bitcoin/bitcoin/pull/31305. The `clang-tidy` check can be run via: ```bash cmake -B build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DBUILD_FOR_FUZZING=ON && cmake --build build -j$(nproc) run-clang-tidy -quiet -p build -j $(nproc) -checks='-*,performance-unnecessary-copy-initialization' | grep -v 'clang-tidy' ``` ACKs for top commit: maflcko: review ACK3305972f7b🏀 achow101: ACK3305972f7btheuni: ACK the much more constrained3305972f7b. hebasto: ACK3305972f7b, tested with clang 19.1.5 + clang-tidy. Tree-SHA512: 64dc3b35f33b7ac064ebf9e56e9f0ceca5d26681a1379dcd2168987960020fe1a282ec4de8c353c82ddf0a534a4866b607fc691e690010c6cea78887045897fb
This commit is contained in:
@@ -62,7 +62,7 @@ static void SignTransactionSingleInput(benchmark::Bench& bench, InputType input_
|
||||
bench.minEpochIterations(100).run([&] {
|
||||
CMutableTransaction tx{unsigned_tx};
|
||||
std::map<COutPoint, Coin> coins;
|
||||
CScript prev_spk = prev_spks[(iter++) % prev_spks.size()];
|
||||
const CScript& prev_spk = prev_spks[(iter++) % prev_spks.size()];
|
||||
coins[prevout] = Coin(CTxOut(10000, prev_spk), /*nHeightIn=*/100, /*fCoinBaseIn=*/false);
|
||||
std::map<int, bilingual_str> input_errors;
|
||||
bool complete = SignTransaction(tx, &keystore, coins, SIGHASH_ALL, input_errors);
|
||||
|
||||
Reference in New Issue
Block a user