Skip to content

Commit c7810db

Browse files
Update astutils.cpp
1 parent fabe149 commit c7810db

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

lib/astutils.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2006,9 +2006,7 @@ bool isOppositeExpression(const Token * const tok1, const Token * const tok2, co
20062006
static bool functionModifiesArguments(const Function* f)
20072007
{
20082008
return std::any_of(f->argumentList.cbegin(), f->argumentList.cend(), [](const Variable& var) {
2009-
if (var.isReference() || var.isPointer())
2010-
return !var.isConst();
2011-
return true;
2009+
return var.isReference() && !var.isConst();
20122010
});
20132011
}
20142012

@@ -2089,7 +2087,7 @@ bool isConstFunctionCall(const Token* ftok, const Library& library)
20892087
return false;
20902088
});
20912089
}
2092-
return true;
2090+
return false;
20932091
}
20942092

20952093
bool isConstExpression(const Token *tok, const Library& library)

0 commit comments

Comments
 (0)