Skip to content
Snippets Groups Projects
Commit eafa2eab authored by Elliot Oram's avatar Elliot Oram
Browse files

Reduce the Scope of subIndex in createFunction

Refs #12669
parent 5ab2489e
No related merge requests found
...@@ -514,8 +514,6 @@ CompositeFunction_sptr ConvFit::createFunction(bool tieCentres) { ...@@ -514,8 +514,6 @@ CompositeFunction_sptr ConvFit::createFunction(bool tieCentres) {
bool useDeltaFunc = m_blnManager->value(m_properties["UseDeltaFunc"]); bool useDeltaFunc = m_blnManager->value(m_properties["UseDeltaFunc"]);
size_t subIndex = 0;
if (useDeltaFunc) { if (useDeltaFunc) {
func = FunctionFactory::Instance().createFunction("DeltaFunction"); func = FunctionFactory::Instance().createFunction("DeltaFunction");
index = model->addFunction(func); index = model->addFunction(func);
...@@ -542,12 +540,14 @@ CompositeFunction_sptr ConvFit::createFunction(bool tieCentres) { ...@@ -542,12 +540,14 @@ CompositeFunction_sptr ConvFit::createFunction(bool tieCentres) {
int fitTypeIndex = m_uiForm.cbFitType->currentIndex(); int fitTypeIndex = m_uiForm.cbFitType->currentIndex();
if (fitTypeIndex > 0) { if (fitTypeIndex > 0) {
size_t subIndex = 0;
auto product = boost::dynamic_pointer_cast<CompositeFunction>( auto product = boost::dynamic_pointer_cast<CompositeFunction>(
FunctionFactory::Instance().createFunction("ProductFunction")); FunctionFactory::Instance().createFunction("ProductFunction"));
if (useTempCorrection) { if (useTempCorrection) {
createTemperatureCorrection(product); createTemperatureCorrection(product);
} }
// Add 1st Lorentzian // Add 1st Lorentzian
// if temperature not included then product is lorentzian * 1 // if temperature not included then product is lorentzian * 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment