Get rid of useless overload of findType().

This commit is contained in:
Roberto Raggi
2010-05-14 14:18:44 +02:00
parent 31135d5767
commit 469b6ef741
2 changed files with 1 additions and 22 deletions

View File

@@ -218,18 +218,7 @@ QList<Symbol *> LookupContext::lookup(const Name *name, Scope *scope) const
break; // it's a formal argument.
if (fun->name() && fun->name()->isQualifiedNameId()) {
const QualifiedNameId *q = fun->name()->asQualifiedNameId();
QList<const Name *> path = fullyQualifiedName(scope->owner());
for (unsigned index = 0; index < q->nameCount() - 1; ++index) { // ### TODO remove me.
const Name *name = q->nameAt(index);
if (name->isNameId() || name->isTemplateNameId())
path.append(name);
}
if (ClassOrNamespace *binding = bindings()->lookupType(path))
if (ClassOrNamespace *binding = bindings()->lookupType(fun))
return binding->lookup(name);
}
@@ -647,12 +636,6 @@ ClassOrNamespace *CreateBindings::lookupType(Symbol *symbol)
return b;
}
ClassOrNamespace *CreateBindings::lookupType(const QList<const Name *> &path)
{
ClassOrNamespace *e = _globalNamespace->findType(path);
return e;
}
void CreateBindings::process(Symbol *s, ClassOrNamespace *classOrNamespace)
{
ClassOrNamespace *previous = switchCurrentClassOrNamespace(classOrNamespace);