clang-tidy: loop conversion

Found with modernize-loop-convert

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2021-04-22 21:48:50 -07:00 committed by Tomas Babej
parent 15f0ab87e0
commit ab7f5b0b51
7 changed files with 36 additions and 38 deletions

View file

@ -320,8 +320,8 @@ std::string ViewTask::render (std::vector <Task>& data, std::vector <int>& seque
if (obfuscate)
if (_columns[c]->type () == "string")
for (unsigned int line = 0; line < cells[c].size (); ++line)
cells[c][line] = obfuscateText (cells[c][line]);
for (auto& line : cells[c])
line = obfuscateText (line);
}
// Listing breaks are simply blank lines inserted when a column value
@ -329,7 +329,7 @@ std::string ViewTask::render (std::vector <Task>& data, std::vector <int>& seque
if (s > 0 &&
_breaks.size () > 0)
{
for (auto& b : _breaks)
for (const auto& b : _breaks)
{
if (data[sequence[s - 1]].get (b) != data[sequence[s]].get (b))
{