From 28e5133f50d8ea6f9151916ac03f14f00d07a28e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Thu, 18 Jul 2019 14:54:39 +0200 Subject: [PATCH] Refactoring: Use range for loop --- lib/symboldatabase.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index b61b4c02b..3fa719fda 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -725,8 +725,8 @@ void SymbolDatabase::createSymbolDatabaseClassInfo() // fill in friend info for (std::list::iterator it = typeList.begin(); it != typeList.end(); ++it) { - for (std::vector::iterator i = it->friendList.begin(); i != it->friendList.end(); ++i) { - i->type = findType(i->nameStart, it->enclosingScope); + for (Type::FriendInfo &friendInfo : it->friendList) { + friendInfo.type = findType(friendInfo.nameStart, it->enclosingScope); } } }