mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
clang-tidy: Add performance-inefficient-vector-operation check
https://clang.llvm.org/extra/clang-tidy/checks/performance/inefficient-vector-operation.html
This commit is contained in:
@@ -1507,6 +1507,7 @@ std::vector<CKeyID> GetAffectedKeys(const CScript& spk, const SigningProvider& p
|
||||
FlatSigningProvider out;
|
||||
InferDescriptor(spk, provider)->Expand(0, DUMMY_SIGNING_PROVIDER, dummy, out);
|
||||
std::vector<CKeyID> ret;
|
||||
ret.reserve(out.pubkeys.size());
|
||||
for (const auto& entry : out.pubkeys) {
|
||||
ret.push_back(entry.first);
|
||||
}
|
||||
@@ -2501,6 +2502,7 @@ TransactionError DescriptorScriptPubKeyMan::FillPSBT(PartiallySignedTransaction&
|
||||
} else {
|
||||
// Maybe there are pubkeys listed that we can sign for
|
||||
std::vector<CPubKey> pubkeys;
|
||||
pubkeys.reserve(input.hd_keypaths.size() + 2);
|
||||
|
||||
// ECDSA Pubkeys
|
||||
for (const auto& [pk, _] : input.hd_keypaths) {
|
||||
|
||||
Reference in New Issue
Block a user