summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/core/tool/interpr6.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/sc/source/core/tool/interpr6.cxx b/sc/source/core/tool/interpr6.cxx
index f482b16e3549..57c0a89fb84d 100644
--- a/sc/source/core/tool/interpr6.cxx
+++ b/sc/source/core/tool/interpr6.cxx
@@ -513,11 +513,8 @@ void ScInterpreter::IterateParameters( ScIterFunc eFunc, bool bTextAsZero )
short nParamCount = GetByte();
const SCSIZE nMatRows = GetRefListArrayMaxSize( nParamCount);
ScMatrixRef xResMat, xResCount;
- auto ResInitVal = [eFunc]()
- {
- return (eFunc == ifPRODUCT) ? 1.0 : 0.0;
- };
- double fRes = ResInitVal();
+ const double ResInitVal = (eFunc == ifPRODUCT) ? 1.0 : 0.0;
+ double fRes = ResInitVal;
double fVal = 0.0;
double fMem = 0.0; // first numeric value != 0.0
sal_uLong nCount = 0;
@@ -772,7 +769,7 @@ void ScInterpreter::IterateParameters( ScIterFunc eFunc, bool bTextAsZero )
xResCount->PutDouble( xResCount->GetDouble(0,i) + nCount, 0,i);
}
}
- if (fRes != ResInitVal())
+ if (fRes != ResInitVal)
{
for (SCSIZE i=0; i < nMatRows; ++i)
{
@@ -785,7 +782,7 @@ void ScInterpreter::IterateParameters( ScIterFunc eFunc, bool bTextAsZero )
}
}
}
- fRes = ResInitVal();
+ fRes = ResInitVal;
nCount = 0;
}
}
@@ -967,7 +964,7 @@ void ScInterpreter::IterateParameters( ScIterFunc eFunc, bool bTextAsZero )
fVecRes += fRes;
xResMat->PutDouble( fVecRes, 0,nRefArrayPos);
// Reset.
- fRes = ResInitVal();
+ fRes = ResInitVal;
nCount = 0;
nRefArrayPos = std::numeric_limits<size_t>::max();
}