Fixed grammar mistake; fixed two VS2013 code analysis messages; removed redundant Token::Match call

This commit is contained in:
PKEuS 2015-03-15 10:06:56 +01:00
parent 713d993f71
commit 0d127f15a5
3 changed files with 5 additions and 4 deletions

View File

@ -945,7 +945,7 @@ void CmdLineParser::PrintHelp()
" 64 bit Windows\n"
" * native\n"
" Unspecified platform. Type sizes of host system\n"
" is assumed, but no further assumptions.\n"
" are assumed, but no further assumptions.\n"
" -q, --quiet Only print error messages.\n"
" -rp, --relative-paths\n"
" -rp=<paths>, --relative-paths=<paths>\n"

View File

@ -322,13 +322,13 @@ void CheckCondition::multiCondition()
const SymbolDatabase* const symbolDatabase = _tokenizer->getSymbolDatabase();
for (std::list<Scope>::const_iterator i = symbolDatabase->scopeList.begin(); i != symbolDatabase->scopeList.end(); ++i) {
if (i->type != Scope::eIf || !Token::simpleMatch(i->classDef, "if ("))
if (i->type != Scope::eIf)
continue;
const Token * const cond1 = i->classDef->next()->astOperand2();
const Token * tok2 = i->classDef->next();
while (tok2) {
for (;;) {
tok2 = tok2->link();
if (!Token::simpleMatch(tok2, ") {"))
break;

View File

@ -2237,7 +2237,8 @@ private:
" }\n"
"};");
ASSERT(db && db->findScopeByName("Bar") && !db->findScopeByName("Bar")->functionList.front().isImplicitlyVirtual(false));
ASSERT_EQUALS(1, db->findScopeByName("Bar")->functionList.size());
if (db)
ASSERT_EQUALS(1, db->findScopeByName("Bar")->functionList.size());
}
// #5590