[Libreoffice-commits] .: sw/source

Caolán McNamara caolan at kemper.freedesktop.org
Sun Dec 5 04:11:20 PST 2010


 sw/source/core/crsr/swcrsr.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 6a11a739e289842b0f780626e04a76ab649786b6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Dec 5 12:11:10 2010 +0000

    cppcheck: the scope of this variable can be reduced

diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index a360e99..3dec37b 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -2120,13 +2120,14 @@ BOOL lcl_SeekEntry( const SwSelBoxes& rTmp, const SwStartNode* pSrch, USHORT& rF
 {
     ULONG nIdx = pSrch->GetIndex();
 
-    USHORT nO = rTmp.Count(), nM, nU = 0;
+    USHORT nO = rTmp.Count();
     if( nO > 0 )
     {
         nO--;
+        USHORT nU = 0;
         while( nU <= nO )
         {
-            nM = nU + ( nO - nU ) / 2;
+            USHORT nM = nU + ( nO - nU ) / 2;
             if( rTmp[ nM ]->GetSttNd() == pSrch )
             {
                 rFndPos = nM;


More information about the Libreoffice-commits mailing list