aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2023-03-26 20:17:55 +0100
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2023-03-26 20:17:55 +0100
commit7e975e6cf86617346c1d8e2568f74a0252c03857 (patch)
tree4c102e4b6a5139106aa9b2f085ab57a68a36953a /src/script
parent516b75f66ec3ba7495fc028c750937bd66cc9bba (diff)
downloadbitcoin-7e975e6cf86617346c1d8e2568f74a0252c03857.tar.xz
clang-tidy: Add `performance-inefficient-vector-operation` check
https://clang.llvm.org/extra/clang-tidy/checks/performance/inefficient-vector-operation.html
Diffstat (limited to 'src/script')
-rw-r--r--src/script/descriptor.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/script/descriptor.cpp b/src/script/descriptor.cpp
index 857fee1818..b4ad1e3f10 100644
--- a/src/script/descriptor.cpp
+++ b/src/script/descriptor.cpp
@@ -830,6 +830,7 @@ protected:
std::vector<CScript> MakeScripts(const std::vector<CPubKey>& keys, Span<const CScript>, FlatSigningProvider&) const override {
CScript ret;
std::vector<XOnlyPubKey> xkeys;
+ xkeys.reserve(keys.size());
for (const auto& key : keys) xkeys.emplace_back(key);
if (m_sorted) std::sort(xkeys.begin(), xkeys.end());
ret << ToByteVector(xkeys[0]) << OP_CHECKSIG;