Skip to content

Commit 0d127f1

Browse files
committed
Fixed grammar mistake; fixed two VS2013 code analysis messages; removed redundant Token::Match call
1 parent 713d993 commit 0d127f1

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

cli/cmdlineparser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ void CmdLineParser::PrintHelp()
945945
" 64 bit Windows\n"
946946
" * native\n"
947947
" Unspecified platform. Type sizes of host system\n"
948-
" is assumed, but no further assumptions.\n"
948+
" are assumed, but no further assumptions.\n"
949949
" -q, --quiet Only print error messages.\n"
950950
" -rp, --relative-paths\n"
951951
" -rp=<paths>, --relative-paths=<paths>\n"

lib/checkcondition.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,13 +322,13 @@ void CheckCondition::multiCondition()
322322
const SymbolDatabase* const symbolDatabase = _tokenizer->getSymbolDatabase();
323323

324324
for (std::list<Scope>::const_iterator i = symbolDatabase->scopeList.begin(); i != symbolDatabase->scopeList.end(); ++i) {
325-
if (i->type != Scope::eIf || !Token::simpleMatch(i->classDef, "if ("))
325+
if (i->type != Scope::eIf)
326326
continue;
327327

328328
const Token * const cond1 = i->classDef->next()->astOperand2();
329329

330330
const Token * tok2 = i->classDef->next();
331-
while (tok2) {
331+
for (;;) {
332332
tok2 = tok2->link();
333333
if (!Token::simpleMatch(tok2, ") {"))
334334
break;

test/testsymboldatabase.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2237,7 +2237,8 @@ class TestSymbolDatabase: public TestFixture {
22372237
" }\n"
22382238
"};");
22392239
ASSERT(db && db->findScopeByName("Bar") && !db->findScopeByName("Bar")->functionList.front().isImplicitlyVirtual(false));
2240-
ASSERT_EQUALS(1, db->findScopeByName("Bar")->functionList.size());
2240+
if (db)
2241+
ASSERT_EQUALS(1, db->findScopeByName("Bar")->functionList.size());
22412242
}
22422243

22432244
// #5590

0 commit comments

Comments
 (0)