BenchmarkFamilies::FindBenchmarks(): correctly use std::vector<>::reserve()

It takes the whole total new capacity, not the increase.
parent a54ef37a
......@@ -150,7 +150,7 @@ bool BenchmarkFamilies::FindBenchmarks(
}
// reserve in the special case the regex ".", since we know the final
// family size.
if (spec == ".") benchmarks->reserve(family_size);
if (spec == ".") benchmarks->reserve(benchmarks->size() + family_size);
for (auto const& args : family->args_) {
for (int num_threads : *thread_counts) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment