forked from qt-creator/qt-creator
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:
@@ -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() )
|
||||
|
||||
Reference in New Issue
Block a user