From dfbc91a19a2a4ef4eb8851c2dc48edddb0a9e06c Mon Sep 17 00:00:00 2001 From: Brandon Hewer <brandon.hewer@stfc.ac.uk> Date: Fri, 4 May 2018 11:03:39 +0100 Subject: [PATCH] Capture environment in lambda Refs #22275 --- Framework/WorkflowAlgorithms/src/QENSFitSequential.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Framework/WorkflowAlgorithms/src/QENSFitSequential.cpp b/Framework/WorkflowAlgorithms/src/QENSFitSequential.cpp index ae7f65bf5aa..0adcb72039b 100644 --- a/Framework/WorkflowAlgorithms/src/QENSFitSequential.cpp +++ b/Framework/WorkflowAlgorithms/src/QENSFitSequential.cpp @@ -531,14 +531,14 @@ std::vector<std::string> QENSFitSequential::getFitParameterNames() const { std::copy_if( uniqueParameters.begin(), uniqueParameters.end(), std::back_inserter(parameters), - [](const std::string ¶meter) { return isFitParameter(parameter); }); + [&](const std::string ¶meter) { return isFitParameter(parameter); }); return parameters; } std::set<std::string> QENSFitSequential::getUniqueParameterNames() const { IFunction_sptr function = getProperty("Function"); std::set<std::string> nameSet; - for (auto i = 0u; i < functions->nParams(); ++i) + for (auto i = 0u; i < function->nParams(); ++i) nameSet.insert(shortParameterName(function->parameterName(i))); return nameSet; } -- GitLab