mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-06 17:37:21 +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
|
@ -87,6 +87,7 @@ void ColumnDepends::measure (Task& task, unsigned int& minimum, unsigned int& ma
|
|||
auto blocking = dependencyGetBlocking (task);
|
||||
|
||||
std::vector <int> blocking_ids;
|
||||
blocking_ids.reserve(blocking.size());
|
||||
for (auto& i : blocking)
|
||||
blocking_ids.push_back (i.id);
|
||||
|
||||
|
@ -129,6 +130,7 @@ void ColumnDepends::render (
|
|||
auto blocking = dependencyGetBlocking (task);
|
||||
|
||||
std::vector <int> blocking_ids;
|
||||
blocking_ids.reserve(blocking.size());
|
||||
for (const auto& t : blocking)
|
||||
blocking_ids.push_back (t.id);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue