Changeset 6fa23f7 in subsurface


Ignore:
Timestamp:
Dec 28, 2017, 8:30:25 AM (4 weeks ago)
Author:
Jan Mulder <jlmulder@…>
Branches:
master
Children:
1ce9b5b
Parents:
92a5e064
git-author:
Jan Mulder <jlmulder@…> (12/28/17 03:46:12)
git-committer:
Jan Mulder <jlmulder@…> (12/28/17 08:30:25)
Message:

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@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • qt-models/filtermodels.cpp

    r2a58be6 r6fa23f7  
    223223                        QString tagName(head->tag->name);
    224224                        int index = tagList.indexOf(tagName);
    225                         if (checkState[index])
     225                        if (index >= 0 && checkState[index])
    226226                                return !negate;
    227227                        head = head->next;
Note: See TracChangeset for help on using the changeset viewer.