[clang-tidy] Add const references where useful
Found with performance-for-range-copy Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
committed by
Paul Beckingham
parent
defd49b13d
commit
37b641259c
@@ -47,7 +47,7 @@ static void countTasks (const std::vector <Task>&, const std::string&, int&, int
|
||||
std::string taskIdentifiers (const std::vector <Task>& tasks)
|
||||
{
|
||||
std::vector <std::string> identifiers;
|
||||
for (auto task: tasks)
|
||||
for (const auto& task: tasks)
|
||||
identifiers.push_back (task.identifier (true));
|
||||
|
||||
return join (", ", identifiers);
|
||||
|
||||
Reference in New Issue
Block a user