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:
Hennadii Stepanov
2023-03-26 20:17:55 +01:00
parent 516b75f66e
commit 7e975e6cf8
22 changed files with 27 additions and 4 deletions

View File

@@ -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));
}