Fixed #2081 (false negative: the function can be declared as const)
This commit is contained in:
parent
d9967d4fd2
commit
a6e915f0cd
|
@ -2200,7 +2200,7 @@ bool CheckClass::checkConstFunc(const SpaceInfo *info, const Token *tok)
|
||||||
}
|
}
|
||||||
|
|
||||||
// function call..
|
// function call..
|
||||||
else if ((Token::Match(tok1, "%var% (") && !Token::Match(tok1, "return|c_str|if")) ||
|
else if ((Token::Match(tok1, "%var% (") && !Token::Match(tok1, "return|c_str|if|string")) ||
|
||||||
Token::Match(tok1, "%var% < %any% > ("))
|
Token::Match(tok1, "%var% < %any% > ("))
|
||||||
{
|
{
|
||||||
isconst = false;
|
isconst = false;
|
||||||
|
|
Loading…
Reference in New Issue