forked from qt-creator/qt-creator
CppEditor: modernize-loop-convert
Change-Id: I80382880a3c35ef0b59729bd222a626bc5c4a32b Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -674,8 +674,7 @@ void CppEditorWidget::switchDeclarationDefinition(bool inNextSplit)
|
||||
ASTPath astPathFinder(d->m_lastSemanticInfo.doc);
|
||||
const QList<AST *> astPath = astPathFinder(textCursor());
|
||||
|
||||
for (int i = 0, size = astPath.size(); i < size; ++i) {
|
||||
AST *ast = astPath.at(i);
|
||||
for (AST *ast : astPath) {
|
||||
if (FunctionDefinitionAST *functionDefinitionAST = ast->asFunctionDefinition()) {
|
||||
if ((functionDefinitionSymbol = functionDefinitionAST->symbol))
|
||||
break; // Function definition found!
|
||||
|
||||
Reference in New Issue
Block a user