mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-07 21:07:20 +02:00
[clang-tidy] Replace push_back with emplace_back
Found with modernize-use-emplace Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
a468537c1b
commit
897759e4dc
6 changed files with 21 additions and 21 deletions
|
@ -242,7 +242,7 @@ std::string ViewTask::render (std::vector <Task>& data, std::vector <int>& seque
|
|||
std::vector <std::vector <std::string>> headers;
|
||||
for (unsigned int c = 0; c < _columns.size (); ++c)
|
||||
{
|
||||
headers.push_back (std::vector <std::string> ());
|
||||
headers.emplace_back();
|
||||
_columns[c]->renderHeader (headers[c], widths[c], _sort[c] ? _sort_header : _header);
|
||||
|
||||
if (headers[c].size () > max_lines)
|
||||
|
@ -312,7 +312,7 @@ std::string ViewTask::render (std::vector <Task>& data, std::vector <int>& seque
|
|||
|
||||
for (unsigned int c = 0; c < _columns.size (); ++c)
|
||||
{
|
||||
cells.push_back (std::vector <std::string> ());
|
||||
cells.emplace_back();
|
||||
_columns[c]->render (cells[c], data[sequence[s]], widths[c], row_color);
|
||||
|
||||
if (cells[c].size () > max_lines)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue