[clang-tidy] match loop size with size()

Found with bugprone-too-small-loop-variable

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2019-09-27 21:15:03 -07:00
committed by Paul Beckingham
parent a02754159c
commit 68c446ea08
3 changed files with 14 additions and 14 deletions

View File

@@ -104,7 +104,7 @@ bool TF2::get (int id, Task& task)
// pending.data file, the task in question cannot appear earlier than line
// (id - 1) in the file. It can, however, appear significantly later because
// it is not known how recent a GC operation was run.
for (unsigned int i = id - 1; i < _tasks.size (); ++i)
for (std::size_t i = id - 1; i < _tasks.size (); ++i)
{
if (_tasks[i].id == id)
{