We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
LoopAnalyzer::findAlgo()
1 parent b422099 commit 9947de9Copy full SHA for 9947de9
1 file changed
lib/checkstl.cpp
@@ -2886,10 +2886,6 @@ namespace {
2886
}
2887
2888
private:
2889
- bool isLoopVarChanged() const {
2890
- return mVarsChanged.count(mLoopVar->varId()) > 0;
2891
- }
2892
-
2893
bool isModified(const Token* tok) const
2894
{
2895
if (tok->variable() && tok->variable()->isConst())
@@ -2942,8 +2938,7 @@ namespace {
2942
2938
2943
2939
if (!valid())
2944
2940
return "";
2945
- bool loopVarChanged = isLoopVarChanged();
2946
- if (!loopVarChanged && mVarsChanged.empty()) {
2941
+ if (mVarsChanged.empty()) {
2947
if (hasGotoOrBreak())
2948
2949
bool alwaysTrue = true;
0 commit comments