Skip to content

Commit 758d6dc

Browse files
Update checkstl.cpp
1 parent 07dd101 commit 758d6dc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎lib/checkstl.cpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1638,6 +1638,8 @@ static std::pair<const Token *, const Token *> isMapFind(const Token *tok)
16381638
return {};
16391639
if (!Token::simpleMatch(tok->astParent(), "=="))
16401640
return {};
1641+
if (tok->astOperand1()->strAt(1) == "count" && (!tok->astParent()->astOperand2()->hasKnownIntValue() || tok->astParent()->getKnownIntValue() != 0)
1642+
return {};
16411643
return {contTok, tok->astOperand2()};
16421644
}
16431645

0 commit comments

Comments
 (0)