diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index 161894c8e79..e1b199661f2 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -178,6 +178,8 @@ class FindUses: protected ASTVisitor } }; + FindScope findScope; + public: FindUses(Control *control) : ASTVisitor(control) @@ -246,8 +248,6 @@ protected: unsigned line, column; getTokenStartPosition(ast->firstToken(), &line, &column); - FindScope findScope; - Scope *scope = findScope(line, column, _functionScope->owner(), translationUnit()); @@ -280,8 +280,6 @@ protected: unsigned line, column; getTokenStartPosition(ast->firstToken(), &line, &column); - FindScope findScope; - Scope *scope = findScope(line, column, _functionScope->owner(), translationUnit());