Skip to content

Commit a6b719e

Browse files
committed
Refactorization: Fixed true positive when self-checking cppcheck
1 parent 8f641aa commit a6b719e

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

lib/symboldatabase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2537,7 +2537,7 @@ static const Type* findVariableTypeIncludingUsedNamespaces(const SymbolDatabase*
25372537
// look for variable type in any using namespace in this scope or above
25382538
while (scope) {
25392539
for (std::list<Scope::UsingInfo>::const_iterator ui = scope->usingList.begin();
2540-
ui != scope->usingList.end(); ++ui) {
2540+
ui != scope->usingList.end(); ++ui) {
25412541
if (ui->scope) {
25422542
argType = symbolDatabase->findVariableType(ui->scope, typeTok);
25432543
if (argType)

lib/tokenize.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2999,12 +2999,10 @@ void Tokenizer::setVarId()
29992999
if (Token::Match(tok2, funcpattern.c_str())) {
30003000
// Goto the end parentheses..
30013001
tok2 = tok2->tokAt(nestedCount*2);
3002-
if (tok2 && tok2->str() == "~")
3002+
if (tok2->str() == "~")
30033003
tok2 = tok2->linkAt(2);
30043004
else
30053005
tok2 = tok2->linkAt(1);
3006-
if (!tok2)
3007-
break;
30083006

30093007
// If this is a function implementation.. add it to funclist
30103008
Token * start = startOfFunction(tok2);

0 commit comments

Comments
 (0)