diff --git a/ApplicationCode/ProjectDataModel/Summary/RimEnsembleCurveSet.cpp b/ApplicationCode/ProjectDataModel/Summary/RimEnsembleCurveSet.cpp index 984757ddad..ea147ee33f 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimEnsembleCurveSet.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimEnsembleCurveSet.cpp @@ -276,7 +276,7 @@ std::vector RimEnsembleCurveSet::visibleCurves() const { std::vector visible; - for (auto c : m_curves) + for (const auto& c : m_curves) { if (c->isCurveVisible()) { @@ -447,7 +447,7 @@ void RimEnsembleCurveSet::fieldChangedByUi(const caf::PdmFieldHandle* changedFie if (dlg.exec() == QDialog::Accepted) { auto curveSelection = dlg.curveSelection(); - if (curveSelection.size() > 0) + if (!curveSelection.empty()) { m_yValuesSummaryGroup = curveSelection[0].ensemble(); m_yValuesCurveVariable->setAddress(curveSelection[0].summaryAddress()); @@ -603,7 +603,7 @@ QList RimEnsembleCurveSet::calculateValueOptions(const c } else if (fieldNeedingOptions == &m_ensembleParameter) { - for (auto param : ensembleParameters()) + for (const auto& param : ensembleParameters()) { options.push_back(caf::PdmOptionItemInfo(param, param)); } @@ -628,9 +628,7 @@ void RimEnsembleCurveSet::getOptionsForSummaryAddresses(std::mapsummaryReader(); if (reader) { - const std::vector allAddresses = reader->allResultAddresses(); - - for (auto& address : allAddresses) + for (const auto& address : reader->allResultAddresses()) { if (summaryFilter && !summaryFilter->isIncludedByFilter(address)) continue;