mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +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:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user