[Libreoffice-commits] .: sc/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Dec 9 13:12:29 PST 2010


 sc/source/core/tool/interpr1.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e4ff5c4c730c49dcc579c4cad1b15fc79d6af674
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Dec 9 17:13:37 2010 +0000

    cppcheck: the scope of these variables can be reduced

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 21b7cd1..d33006e 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -3357,7 +3357,6 @@ double ScInterpreter::IterateParameters( ScIterFunc eFunc, BOOL bTextAsZero )
             case svDoubleRef :
             case svRefList :
             {
-                USHORT nErr = 0;
                 PopDoubleRef( aRange, nParamCount, nRefInList);
                 if ( nGlobalError && ( eFunc == ifCOUNT2 || eFunc == ifCOUNT ) )
                 {
@@ -3386,6 +3385,7 @@ double ScInterpreter::IterateParameters( ScIterFunc eFunc, BOOL bTextAsZero )
                 else
                 {
                     ScValueIterator aValIter( pDok, aRange, glSubTotal, bTextAsZero );
+                    USHORT nErr = 0;
                     if (aValIter.GetFirst(fVal, nErr))
                     {
                         // placed the loop on the inside for performance reasons:
@@ -7212,10 +7212,10 @@ void ScInterpreter::ScRight()
 void ScInterpreter::ScSearch()
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSearch" );
-    double fAnz;
     BYTE nParamCount = GetByte();
     if ( MustHaveParamCount( nParamCount, 2, 3 ) )
     {
+        double fAnz;
         if (nParamCount == 3)
         {
             fAnz = ::rtl::math::approxFloor(GetDouble());


More information about the Libreoffice-commits mailing list