Refactorization: Fixed true positive when self-checking cppcheck
This commit is contained in:
parent
8f641aaa76
commit
a6b719eb10
|
@ -2537,7 +2537,7 @@ static const Type* findVariableTypeIncludingUsedNamespaces(const SymbolDatabase*
|
|||
// look for variable type in any using namespace in this scope or above
|
||||
while (scope) {
|
||||
for (std::list<Scope::UsingInfo>::const_iterator ui = scope->usingList.begin();
|
||||
ui != scope->usingList.end(); ++ui) {
|
||||
ui != scope->usingList.end(); ++ui) {
|
||||
if (ui->scope) {
|
||||
argType = symbolDatabase->findVariableType(ui->scope, typeTok);
|
||||
if (argType)
|
||||
|
|
|
@ -2999,12 +2999,10 @@ void Tokenizer::setVarId()
|
|||
if (Token::Match(tok2, funcpattern.c_str())) {
|
||||
// Goto the end parentheses..
|
||||
tok2 = tok2->tokAt(nestedCount*2);
|
||||
if (tok2 && tok2->str() == "~")
|
||||
if (tok2->str() == "~")
|
||||
tok2 = tok2->linkAt(2);
|
||||
else
|
||||
tok2 = tok2->linkAt(1);
|
||||
if (!tok2)
|
||||
break;
|
||||
|
||||
// If this is a function implementation.. add it to funclist
|
||||
Token * start = startOfFunction(tok2);
|
||||
|
|
Loading…
Reference in New Issue