diff options
author | fanquake <fanquake@gmail.com> | 2023-03-27 14:22:37 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2023-03-27 14:34:52 +0100 |
commit | 39630675553280fe72254de69ec1ed2bc8fc9808 (patch) | |
tree | c65e616e43952456894989de68d6541d6b79a08b /src/test/util | |
parent | 3e835ca95863b1350a6425dad6e2bc604e01ecdf (diff) | |
parent | 03ec5b6f9ca3af28c9ce25cf2393e28ae852d808 (diff) |
Merge bitcoin/bitcoin#26642: clang-tidy: Add more `performance-*` checks and related fixes
03ec5b6f9ca3af28c9ce25cf2393e28ae852d808 clang-tidy: Exclude `performance-*` checks rather including them (Hennadii Stepanov)
24004372302adfc0e7cb36f8db6830694bf050e9 clang-tidy: Add `performance-type-promotion-in-math-fn` check (Hennadii Stepanov)
7e975e6cf86617346c1d8e2568f74a0252c03857 clang-tidy: Add `performance-inefficient-vector-operation` check (Hennadii Stepanov)
516b75f66ec3ba7495fc028c750937bd66cc9bba clang-tidy: Add `performance-faster-string-find` check (Hennadii Stepanov)
Pull request description:
ACKs for top commit:
martinus:
ACK 03ec5b6f9ca3af28c9ce25cf2393e28ae852d808
TheCharlatan:
re-ACK [03ec5b6](https://github.com/bitcoin/bitcoin/pull/26642/commits/03ec5b6f9ca3af28c9ce25cf2393e28ae852d808)
Tree-SHA512: 2dfa52f9131da88826f32583bfd534a56a998477db9804b7333c0e7ac0b6b36141009755c7163b9f95d0ecbf5c2cb63f8a69ce4b114bb83423faed21b50cec67
Diffstat (limited to 'src/test/util')
-rw-r--r-- | src/test/util/net.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/util/net.cpp b/src/test/util/net.cpp index 070a6a1c50..27a1277680 100644 --- a/src/test/util/net.cpp +++ b/src/test/util/net.cpp @@ -84,6 +84,7 @@ bool ConnmanTestMsg::ReceiveMsgFrom(CNode& node, CSerializedNetMsg& ser_msg) con std::vector<NodeEvictionCandidate> GetRandomNodeEvictionCandidates(int n_candidates, FastRandomContext& random_context) { std::vector<NodeEvictionCandidate> candidates; + candidates.reserve(n_candidates); for (int id = 0; id < n_candidates; ++id) { candidates.push_back({ /*id=*/id, |