Commit ca1d1259 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Cleanup.

parent 469b6ef7
......@@ -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)
......
......@@ -61,7 +61,6 @@ public:
ClassOrNamespace *lookupType(const Name *name);
ClassOrNamespace *findType(const Name *name);
ClassOrNamespace *findType(const QList<const Name *> &path);
private:
/// \internal
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment