diff options
author | Dan Williams <fa@openoffice.org> | 2004-03-08 15:03:51 +0000 |
---|---|---|
committer | Dan Williams <fa@openoffice.org> | 2004-03-08 15:03:51 +0000 |
commit | feca7966017815f8fdc9d316cf8921c30a5c532b (patch) | |
tree | 74321a4363da5c8dc79e7aff0b5a8b69ee12cb20 /chart2/source/tools/PotentialRegressionCurveCalculator.cxx | |
parent | 1770f19315761a802326c923b1e876a9b65893f9 (diff) |
Correct variable scoping in 'for' statements to be ISO C++ compliant. You
technically cannot declare a variable like 'for ( int i=0; ...; ...) {} i = 1'
and then use it later outside of the for() statement.
Diffstat (limited to 'chart2/source/tools/PotentialRegressionCurveCalculator.cxx')
-rw-r--r-- | chart2/source/tools/PotentialRegressionCurveCalculator.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chart2/source/tools/PotentialRegressionCurveCalculator.cxx b/chart2/source/tools/PotentialRegressionCurveCalculator.cxx index 6c21fbc5a9b8..16c7a990ce3c 100644 --- a/chart2/source/tools/PotentialRegressionCurveCalculator.cxx +++ b/chart2/source/tools/PotentialRegressionCurveCalculator.cxx @@ -2,9 +2,9 @@ * * $RCSfile: PotentialRegressionCurveCalculator.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: bm $ $Date: 2004-01-26 09:13:04 $ + * last change: $Author: fa $ $Date: 2004-03-08 16:03:50 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -108,7 +108,8 @@ void SAL_CALL PotentialRegressionCurveCalculator::recalculateRegression( } double fAverageX = 0.0, fAverageY = 0.0; - for( size_t i = 0; i < nMax; ++i ) + size_t i = 0; + for( i = 0; i < nMax; ++i ) { fAverageX += log( aValues.first[i] ); fAverageY += log( aValues.second[i] ); |