cleanup: Argument cannot be negative

CID 208296. IndexOf can return -1 when not found, which will
not happen in this context, so just to silence Coverity.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
Jan Mulder 2017-12-28 12:46:12 +01:00
parent 92a5e0644e
commit 6fa23f74f7

View file

@ -222,7 +222,7 @@ bool TagFilterModel::doFilter(dive *d, QModelIndex &index0, QAbstractItemModel *
while (head) {
QString tagName(head->tag->name);
int index = tagList.indexOf(tagName);
if (checkState[index])
if (index >= 0 && checkState[index])
return !negate;
head = head->next;
}