CMake: Use for instead of foreach

Change-Id: I4e2c929414cf1f7b052ae9f6846f43ae20fcee4c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Tobias Hunger
2017-04-20 15:54:09 +02:00
parent 7a388e7b4b
commit ff46e67971

View File

@@ -40,6 +40,7 @@
#include <projectexplorer/taskhub.h> #include <projectexplorer/taskhub.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/asconst.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/qtcprocess.h> #include <utils/qtcprocess.h>
@@ -294,7 +295,7 @@ void ServerModeReader::generateProjectTree(CMakeProjectNode *root,
void ServerModeReader::updateCodeModel(CppTools::RawProjectParts &rpps) void ServerModeReader::updateCodeModel(CppTools::RawProjectParts &rpps)
{ {
int counter = 0; int counter = 0;
foreach (const FileGroup *fg, m_fileGroups) { for (const FileGroup *fg : Utils::asConst(m_fileGroups)) {
++counter; ++counter;
const QString defineArg const QString defineArg
= transform(fg->defines, [](const QString &s) -> QString { = transform(fg->defines, [](const QString &s) -> QString {