Reuse TypeOfExpression.

This commit is contained in:
Roberto Raggi
2010-05-17 13:06:49 +02:00
parent 18490596f9
commit 5058dd670a
2 changed files with 3 additions and 4 deletions

View File

@@ -28,7 +28,6 @@
**************************************************************************/
#include "FindUsages.h"
#include "TypeOfExpression.h"
#include "DeprecatedLookupContext.h"
#include <Control.h>
@@ -54,6 +53,7 @@ FindUsages::FindUsages(Document::Ptr doc, const Snapshot &snapshot)
_inQProperty(false)
{
_snapshot.insert(_doc);
typeofExpression.init(_doc, _snapshot, _context.bindings());
}
void FindUsages::setGlobalNamespaceBinding(NamespaceBindingPtr globalNamespaceBinding)
@@ -269,9 +269,6 @@ void FindUsages::checkExpression(unsigned startToken, unsigned endToken)
const QString expression = _source.mid(begin, end - begin);
// qDebug() << "*** check expression:" << expression;
TypeOfExpression typeofExpression;
typeofExpression.init(_doc, _snapshot);
unsigned line, column;
getTokenStartPosition(startToken, &line, &column);
Scope *scope = _doc->scopeAt(line, column);