[Libreoffice-commits] core.git: basic/source

Mike Kaganski mike.kaganski at collabora.com
Fri Dec 15 18:57:29 UTC 2017


 basic/source/classes/sbunoobj.cxx |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 8de8e0ce218dbb9e74d2a41517d5f6b1d36f478f
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date:   Fri Dec 15 13:26:28 2017 +0200

    Get rid of loop counter variable
    
    Change-Id: Ia4f4e24819525287e720a9c016b3666bc006b545
    Reviewed-on: https://gerrit.libreoffice.org/46531
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 3c223f3010e7..829db9b695e4 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -880,10 +880,7 @@ Type getUnoTypeForSbxValue( const SbxValue* pVal )
                     // this one - otherwise the whole will be considered as Any-Sequence
                     bool bNeedsInit = true;
 
-                    sal_Int32 nSize = nUpper - nLower + 1;
-                    sal_Int32 aIdx[1];
-                    aIdx[0] = nLower;
-                    for (sal_Int32 i = 0; i < nSize; ++i, ++aIdx[0])
+                    for (sal_Int32 aIdx[1] = { nLower }; aIdx[0] <= nUpper; ++aIdx[0])
                     {
                         SbxVariableRef xVar = pArray->Get32(aIdx);
                         Type aType = getUnoTypeForSbxValue( xVar.get() );


More information about the Libreoffice-commits mailing list