C++: Minor cleanup in TypeResolver

Change-Id: I9da92d7669d15c1dfd954ec233e21c08b8432b24
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
This commit is contained in:
Orgad Shaneh
2015-05-18 22:50:06 +03:00
committed by Orgad Shaneh
parent f3a46e5ad5
commit 0a94329b17

View File

@@ -128,7 +128,6 @@ bool TypeResolver::isTypedefWithName(const Declaration *declaration, const Name
bool TypeResolver::findTypedef(const QList<LookupItem> &namedTypeItems, FullySpecifiedType *type, bool TypeResolver::findTypedef(const QList<LookupItem> &namedTypeItems, FullySpecifiedType *type,
Scope **scope, QSet<Symbol *> &visited) Scope **scope, QSet<Symbol *> &visited)
{ {
bool foundTypedef = false;
foreach (const LookupItem &it, namedTypeItems) { foreach (const LookupItem &it, namedTypeItems) {
Symbol *declaration = it.declaration(); Symbol *declaration = it.declaration();
if (!declaration || !declaration->isTypedef()) if (!declaration || !declaration->isTypedef())
@@ -152,11 +151,10 @@ bool TypeResolver::findTypedef(const QList<LookupItem> &namedTypeItems, FullySpe
*scope = it.scope(); *scope = it.scope();
_binding = it.binding(); _binding = it.binding();
foundTypedef = true; return true;
break;
} }
return foundTypedef; return false;
} }
} // namespace CPlusPlus } // namespace CPlusPlus