clang-tidy: add missing reserve calls

Found with performance-inefficient-vector-operation

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2021-02-28 19:10:54 -08:00
committed by Tomas Babej
parent 3cafb5257e
commit d0c4350c2f
4 changed files with 6 additions and 0 deletions

View File

@@ -196,6 +196,7 @@ void Hooks::onExit () const
// Convert to a vector of strings.
std::vector <std::string> input;
input.reserve(tasks.size());
for (auto& t : tasks)
input.push_back (t.composeJSON ());