From 0a94329b17889bb4d1a0335a639b3d28a8dc17e2 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Mon, 18 May 2015 22:50:06 +0300 Subject: [PATCH] C++: Minor cleanup in TypeResolver Change-Id: I9da92d7669d15c1dfd954ec233e21c08b8432b24 Reviewed-by: Przemyslaw Gorszkowski --- src/libs/cplusplus/TypeResolver.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/libs/cplusplus/TypeResolver.cpp b/src/libs/cplusplus/TypeResolver.cpp index 415418a0b10..fcc21662a42 100644 --- a/src/libs/cplusplus/TypeResolver.cpp +++ b/src/libs/cplusplus/TypeResolver.cpp @@ -128,7 +128,6 @@ bool TypeResolver::isTypedefWithName(const Declaration *declaration, const Name bool TypeResolver::findTypedef(const QList &namedTypeItems, FullySpecifiedType *type, Scope **scope, QSet &visited) { - bool foundTypedef = false; foreach (const LookupItem &it, namedTypeItems) { Symbol *declaration = it.declaration(); if (!declaration || !declaration->isTypedef()) @@ -152,11 +151,10 @@ bool TypeResolver::findTypedef(const QList &namedTypeItems, FullySpe *scope = it.scope(); _binding = it.binding(); - foundTypedef = true; - break; + return true; } - return foundTypedef; + return false; } } // namespace CPlusPlus