From ca1d1259c60728be290dd4846f371a2bcff5fbf5 Mon Sep 17 00:00:00 2001
From: Roberto Raggi <roberto.raggi@nokia.com>
Date: Fri, 14 May 2010 14:37:17 +0200
Subject: [PATCH] Cleanup.

---
 src/libs/cplusplus/LookupContext.cpp | 25 +------------------------
 src/libs/cplusplus/LookupContext.h   |  1 -
 2 files changed, 1 insertion(+), 25 deletions(-)

diff --git a/src/libs/cplusplus/LookupContext.cpp b/src/libs/cplusplus/LookupContext.cpp
index 09465a2fee0..d1d8f386b9b 100644
--- a/src/libs/cplusplus/LookupContext.cpp
+++ b/src/libs/cplusplus/LookupContext.cpp
@@ -341,15 +341,9 @@ void ClassOrNamespace::lookup_helper(const Name *name, ClassOrNamespace *binding
                                      QSet<ClassOrNamespace *> *processed,
                                      const TemplateNameId *templateId)
 {
-    if (! binding)
-        return;
-
-    else if (! processed->contains(binding)) {
+    if (binding && ! processed->contains(binding)) {
         processed->insert(binding);
 
-        //Overview oo;
-        //qDebug() << "search for:" << oo(name) << "template:" << oo(templateId) << "b:" << oo(binding->_templateId);
-
         foreach (Symbol *s, binding->symbols()) {
             if (ScopedSymbol *scoped = s->asScopedSymbol())
                 _factory->lookupInScope(name, scoped->members(), result, templateId);
@@ -360,8 +354,6 @@ void ClassOrNamespace::lookup_helper(const Name *name, ClassOrNamespace *binding
 
         foreach (ClassOrNamespace *u, binding->usings())
             lookup_helper(name, u, result, processed, binding->_templateId);
-
-        //qDebug() << "=======" << oo(name) << "template:" << oo(binding->_templateId);
     }
 }
 
@@ -444,21 +436,6 @@ ClassOrNamespace *ClassOrNamespace::findType(const Name *name)
     return lookupType_helper(name, &processed, /*searchInEnclosingScope =*/ false);
 }
 
-ClassOrNamespace *ClassOrNamespace::findType(const QList<const Name *> &path)
-{
-    if (path.isEmpty())
-        return globalNamespace();
-
-    ClassOrNamespace *e = this;
-
-    for (int i = 0; e && i < path.size(); ++i) {
-        QSet<ClassOrNamespace *> processed;
-        e = e->lookupType_helper(path.at(i), &processed, /*searchInEnclosingScope =*/ false);
-    }
-
-    return e;
-}
-
 ClassOrNamespace *ClassOrNamespace::lookupType_helper(const Name *name,
                                                       QSet<ClassOrNamespace *> *processed,
                                                       bool searchInEnclosingScope)
diff --git a/src/libs/cplusplus/LookupContext.h b/src/libs/cplusplus/LookupContext.h
index 7b0f69b4444..20829d9bb20 100644
--- a/src/libs/cplusplus/LookupContext.h
+++ b/src/libs/cplusplus/LookupContext.h
@@ -61,7 +61,6 @@ public:
 
     ClassOrNamespace *lookupType(const Name *name);
     ClassOrNamespace *findType(const Name *name);
-    ClassOrNamespace *findType(const QList<const Name *> &path);
 
 private:
     /// \internal
-- 
GitLab