summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/core/tool/interpr5.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index 2b30f4e1fe49..b1c840e4fd94 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -1861,8 +1861,11 @@ double lcl_GetColumnMaximumNorm(const ScMatrixRef& pMatA, SCSIZE nC, SCSIZE nR,
{
double fNorm = 0.0;
for (SCSIZE row=nR; row<nN; row++)
- if (fNorm < fabs(pMatA->GetDouble(nC,row)))
- fNorm = fabs(pMatA->GetDouble(nC,row));
+ {
+ double fVal = fabs(pMatA->GetDouble(nC,row));
+ if (fNorm < fVal)
+ fNorm = fVal;
+ }
return fNorm;
}
@@ -1872,8 +1875,11 @@ double lcl_TGetColumnMaximumNorm(const ScMatrixRef& pMatA, SCSIZE nR, SCSIZE nC,
{
double fNorm = 0.0;
for (SCSIZE col=nC; col<nN; col++)
- if (fNorm < fabs(pMatA->GetDouble(col,nR)))
- fNorm = fabs(pMatA->GetDouble(col,nR));
+ {
+ double fVal = fabs(pMatA->GetDouble(col,nR));
+ if (fNorm < fVal)
+ fNorm = fVal;
+ }
return fNorm;
}