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

Caolán McNamara caolanm at redhat.com
Sun Feb 24 15:24:45 PST 2013


 scripting/source/stringresource/stringresource.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit df37f7d8e82d8d0854076c3c9be64ee3a155f7bf
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Feb 24 23:24:12 2013 +0000

    move loop variables into least scope pos
    
    Change-Id: I8e69e92bbfee2bf20918d041ecc6b7a3f7729fbd

diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index 4be1a77..6c8bb64 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -2238,8 +2238,7 @@ bool StringResourcePersistenceImpl::implWritePropertiesFile( LocaleItem* pLocale
 
         // Create sorted array of pointers to the id strings
         const ::rtl::OUString** pIdPtrs = new const ::rtl::OUString*[nTabSize];
-        sal_Int32 i;
-        for( i = 0 ; i < nTabSize ; i++ )
+        for(sal_Int32 i = 0 ; i < nTabSize ; i++ )
             pIdPtrs[i] = NULL;
         for( it_index = rIndexMap.begin(); it_index != rIndexMap.end(); ++it_index )
         {
@@ -2248,7 +2247,7 @@ bool StringResourcePersistenceImpl::implWritePropertiesFile( LocaleItem* pLocale
         }
 
         // Write lines in correct order
-        for( i = 0 ; i < nTabSize ; i++ )
+        for(sal_Int32 i = 0 ; i < nTabSize ; i++ )
         {
             const ::rtl::OUString* pStr = pIdPtrs[i];
             if( pStr != NULL )


More information about the Libreoffice-commits mailing list