Use const iterator with std::find_if where possible

Make the resulting interator const.

Change-Id: I4aadcfff35f6b1015e506bc75bcfc2a1f1be4d65
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2020-11-18 13:06:55 +01:00
parent 48c2afe157
commit b269066435
8 changed files with 17 additions and 17 deletions

View File

@@ -426,7 +426,7 @@ private:
auto updateDialog = [&generatorList, generatorCombo, extraGeneratorCombo,
platformEdit, toolsetEdit](const QString &name) {
auto it = std::find_if(generatorList.constBegin(), generatorList.constEnd(),
const auto it = std::find_if(generatorList.constBegin(), generatorList.constEnd(),
[name](const CMakeTool::Generator &g) { return g.name == name; });
QTC_ASSERT(it != generatorList.constEnd(), return);
generatorCombo->setCurrentText(name);