Skip to content

Commit 9947de9

Browse files
committed
checkstl.cpp: removed unnessary condition from LoopAnalyzer::findAlgo()
1 parent b422099 commit 9947de9

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

lib/checkstl.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2886,10 +2886,6 @@ namespace {
28862886
}
28872887
}
28882888
private:
2889-
bool isLoopVarChanged() const {
2890-
return mVarsChanged.count(mLoopVar->varId()) > 0;
2891-
}
2892-
28932889
bool isModified(const Token* tok) const
28942890
{
28952891
if (tok->variable() && tok->variable()->isConst())
@@ -2942,8 +2938,7 @@ namespace {
29422938
{
29432939
if (!valid())
29442940
return "";
2945-
bool loopVarChanged = isLoopVarChanged();
2946-
if (!loopVarChanged && mVarsChanged.empty()) {
2941+
if (mVarsChanged.empty()) {
29472942
if (hasGotoOrBreak())
29482943
return "";
29492944
bool alwaysTrue = true;

0 commit comments

Comments
 (0)