fixed cppcheck warnings
This commit is contained in:
parent
cae605b1ec
commit
3986c0dc64
|
@ -1982,7 +1982,7 @@ void CheckOther::checkMisusedScopedObject()
|
|||
&& Token::Match(tok->linkAt(2), ") ; !!}")
|
||||
&& symbolDatabase->isClassOrStruct(tok->next()->str())
|
||||
&& (!tok->next()->function() || // is not a function on this scope
|
||||
(tok->next()->function() && tok->next()->function()->isConstructor()))) { // or is function in this scope and it's a ctor
|
||||
tok->next()->function()->isConstructor())) { // or is function in this scope and it's a ctor
|
||||
tok = tok->next();
|
||||
misusedScopeObjectError(tok, tok->str());
|
||||
tok = tok->next();
|
||||
|
|
|
@ -602,7 +602,7 @@ void Tokenizer::simplifyTypedef()
|
|||
// Skip typedefs inside parentheses (#2453 and #4002)
|
||||
tok = tok->next();
|
||||
} else if (Token::Match(tok, "class|struct|namespace %any%") &&
|
||||
(!tok->previous() || (tok->previous() && tok->previous()->str() != "enum"))) {
|
||||
(!tok->previous() || tok->previous()->str() != "enum")) {
|
||||
isNamespace = (tok->str() == "namespace");
|
||||
hasClass = true;
|
||||
className = tok->next()->str();
|
||||
|
|
Loading…
Reference in New Issue