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

Matteo Casalin matteo.casalin at yahoo.com
Mon Sep 16 15:07:55 PDT 2013


 sw/source/filter/ww8/writerwordglue.cxx |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 15968833d5f3b6b89029774b384f92ca115dfe2d
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date:   Mon Sep 16 07:58:02 2013 +0200

    Prefer a 'for' loop to a 'while' one
    
    Change-Id: Ic3d36dbe1cf596d9eab3cc919bc2596f2e89a98c
    Reviewed-on: https://gerrit.libreoffice.org/5967
    Reviewed-by: Matteo Casalin <matteo.casalin at yahoo.com>
    Tested-by: Matteo Casalin <matteo.casalin at yahoo.com>

diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx
index 4bc0182..34e64a6 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -796,8 +796,7 @@ namespace sw
             }
 
             sal_Int32 nLen = rParams.getLength();
-            sal_Int32 nI = 0;
-            while (nI < nLen)
+            for (sal_Int32 nI = 0; nI < nLen; ++nI)
             {
                 if (rParams[nI] == '\\')
                     nI++;
@@ -949,7 +948,6 @@ namespace sw
                         }
                     }
                 }
-                ++nI;
             }
 
             if (bForceNatNum)


More information about the Libreoffice-commits mailing list