applied patch from php-coder from ticket 1724; removed TODO_TESTCASES;
This commit is contained in:
parent
75bac44ed8
commit
f75ca79849
|
@ -1976,7 +1976,7 @@ bool CheckClass::checkConstFunc(const std::string &classname, const Var *varlist
|
|||
}
|
||||
|
||||
// function call..
|
||||
else if (tok1->str() != "return" && Token::Match(tok1, "%var% ("))
|
||||
else if (tok1->str() != "return" && Token::Match(tok1, "%var% (") && tok1->str() != "c_str")
|
||||
{
|
||||
isconst = false;
|
||||
break;
|
||||
|
|
|
@ -3451,7 +3451,7 @@ private:
|
|||
"std::string m_strVal;\n"
|
||||
"};\n"
|
||||
);
|
||||
TODO_ASSERT_EQUALS("[test.cpp:4]: (style) The function 'A::strGetString' can be const\n", errout.str());
|
||||
ASSERT_EQUALS("[test.cpp:4]: (style) The function 'A::strGetString' can be const\n", errout.str());
|
||||
|
||||
checkConst("class A{\n"
|
||||
"public:\n"
|
||||
|
@ -3462,7 +3462,7 @@ private:
|
|||
"std::string m_strVal;\n"
|
||||
"};\n"
|
||||
);
|
||||
TODO_ASSERT_EQUALS("[test.cpp:4]: (style) The function 'A::strGetString1' can be const\n", errout.str());
|
||||
ASSERT_EQUALS("[test.cpp:4]: (style) The function 'A::strGetString1' can be const\n", errout.str());
|
||||
}
|
||||
|
||||
// increment/decrement => not const
|
||||
|
|
Loading…
Reference in New Issue