Remove redundant type check (#3689)
This commit is contained in:
parent
bd2c4bb0a6
commit
59837be152
|
@ -710,8 +710,7 @@ void CheckUnusedVar::checkFunctionVariableUsage_iterateScopes(const Scope* const
|
||||||
i->typeEndToken()->isStandardType() ||
|
i->typeEndToken()->isStandardType() ||
|
||||||
isRecordTypeWithoutSideEffects(i->type()) ||
|
isRecordTypeWithoutSideEffects(i->type()) ||
|
||||||
mSettings->library.detectContainer(i->typeStartToken(), /*iterator*/ false) ||
|
mSettings->library.detectContainer(i->typeStartToken(), /*iterator*/ false) ||
|
||||||
(i->isStlType() &&
|
i->isStlType())
|
||||||
!Token::Match(i->typeStartToken()->tokAt(2), "lock_guard|unique_lock|shared_ptr|unique_ptr|auto_ptr|shared_lock")))
|
|
||||||
type = Variables::standard;
|
type = Variables::standard;
|
||||||
if (type == Variables::none || isPartOfClassStructUnion(i->typeStartToken()))
|
if (type == Variables::none || isPartOfClassStructUnion(i->typeStartToken()))
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue