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

@@ -561,7 +561,7 @@ QList<ProjectPart::Ptr> fetchProjectParts(CppTools::CppModelManager *modelManage
ProjectPart *findProjectPartForCurrentProject(const QList<ProjectPart::Ptr> &projectParts,
ProjectExplorer::Project *currentProject)
{
auto found = std::find_if(projectParts.cbegin(),
const auto found = std::find_if(projectParts.cbegin(),
projectParts.cend(),
[&](const CppTools::ProjectPart::Ptr &projectPart) {
return projectPart->project == currentProject;