C++: Save a Symbol::asScope() call

isScope() calls asScope().

Change-Id: I9ffe3bf2b9cff567b32a59cf27727097642b560b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
Nikolai Kosjar
2014-11-12 11:37:46 +01:00
parent 69504c25ca
commit e3419dc5ac

View File

@@ -509,10 +509,8 @@ QString Document::functionAt(int line, int column, int *lineOpeningDeclaratorPar
// Find the enclosing function scope (which might be several levels up, or we might be standing
// on it)
Scope *scope;
if (symbol->isScope())
scope = symbol->asScope();
else
Scope *scope = symbol->asScope();
if (!scope)
scope = symbol->enclosingScope();
while (scope && !scope->isFunction() )