Kaydet (Commit) f5011d72 authored tarafından Takeshi Abe's avatar Takeshi Abe Kaydeden (comit) Noel Grandin

sc: Calculate the value only once for micro-optimization

Change-Id: I394bca979d4b914d6b6997837fab636b9bc4e479
Reviewed-on: https://gerrit.libreoffice.org/61879
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 70a60cec
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment