aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoin-util.cpp
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/bitcoin-util.cpp
parent516b75f66ec3ba7495fc028c750937bd66cc9bba (diff)
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/bitcoin-util.cpp')
-rw-r--r--src/bitcoin-util.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bitcoin-util.cpp b/src/bitcoin-util.cpp
index cf59ca9bff..c0ba4df2be 100644
--- a/src/bitcoin-util.cpp
+++ b/src/bitcoin-util.cpp
@@ -127,6 +127,7 @@ static int Grind(const std::vector<std::string>& args, std::string& strPrint)
std::vector<std::thread> threads;
int n_tasks = std::max(1u, std::thread::hardware_concurrency());
+ threads.reserve(n_tasks);
for (int i = 0; i < n_tasks; ++i) {
threads.emplace_back(grind_task, nBits, header, i, n_tasks, std::ref(found), std::ref(proposed_nonce));
}