diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2023-03-26 20:17:55 +0100 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2023-03-26 20:17:55 +0100 |
commit | 7e975e6cf86617346c1d8e2568f74a0252c03857 (patch) | |
tree | 4c102e4b6a5139106aa9b2f085ab57a68a36953a /src/bench/lockedpool.cpp | |
parent | 516b75f66ec3ba7495fc028c750937bd66cc9bba (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/bench/lockedpool.cpp')
-rw-r--r-- | src/bench/lockedpool.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/bench/lockedpool.cpp b/src/bench/lockedpool.cpp index 161f9af621..6851ed0bd8 100644 --- a/src/bench/lockedpool.cpp +++ b/src/bench/lockedpool.cpp @@ -17,9 +17,7 @@ static void BenchLockedPool(benchmark::Bench& bench) const size_t synth_size = 1024*1024; Arena b(synth_base, synth_size, 16); - std::vector<void*> addr; - for (int x=0; x<ASIZE; ++x) - addr.push_back(nullptr); + std::vector<void*> addr{ASIZE, nullptr}; uint32_t s = 0x12345678; bench.run([&] { int idx = s & (addr.size() - 1); |