[Libreoffice-commits] core.git: sc/source
Jochen Nitschke
j.nitschke+logerrit at ok.de
Mon Sep 12 18:38:22 UTC 2016
sc/source/core/tool/interpr1.cxx | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
New commits:
commit e93fcb551479964009e86d08419f5428c7e784f0
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date: Mon Sep 5 23:32:04 2016 +0200
cppcheck: variable scope
Change-Id: Ibe52bb265a064cd454d408ccac06f3bbbb5236e6
Reviewed-on: https://gerrit.libreoffice.org/28683
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index f80239c..f65a2d3 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -3618,7 +3618,6 @@ void ScInterpreter::GetStVarParams( double& rVal, double& rValCount, bool bTextA
std::vector<double> values;
double fSum = 0.0;
double vSum = 0.0;
- double vMean = 0.0;
double fVal = 0.0;
rValCount = 0.0;
ScAddress aAdr;
@@ -3730,7 +3729,7 @@ void ScInterpreter::GetStVarParams( double& rVal, double& rValCount, bool bTextA
SetError( errDivisionByZero);
if (!nGlobalError)
{
- vMean = fSum / n;
+ const double vMean = fSum / n;
for (::std::vector<double>::size_type i = 0; i < n; i++)
vSum += ::rtl::math::approxSub( values[i], vMean) * ::rtl::math::approxSub( values[i], vMean);
}
More information about the Libreoffice-commits
mailing list