mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
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:
parent
3cafb5257e
commit
d0c4350c2f
4 changed files with 6 additions and 0 deletions
|
@ -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 ());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue