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:
@@ -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 ());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user