applied patch from php-coder from ticket 1724; removed TODO_TESTCASES;

This commit is contained in:
Martin Ettl 2010-06-05 19:49:49 +02:00
parent 75bac44ed8
commit f75ca79849
2 changed files with 3 additions and 3 deletions

View File

@ -1976,7 +1976,7 @@ bool CheckClass::checkConstFunc(const std::string &classname, const Var *varlist
} }
// function call.. // 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; isconst = false;
break; break;

View File

@ -3451,7 +3451,7 @@ private:
"std::string m_strVal;\n" "std::string m_strVal;\n"
"};\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" checkConst("class A{\n"
"public:\n" "public:\n"
@ -3462,7 +3462,7 @@ private:
"std::string m_strVal;\n" "std::string m_strVal;\n"
"};\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 // increment/decrement => not const