mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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:
parent
92a5e0644e
commit
6fa23f74f7
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue