diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2014-12-06 01:07:11 +0100 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2014-12-08 08:01:58 +0000 |
commit | 3338f479182a5face7f143bdc4b9ea9067028887 (patch) | |
tree | 1f9ae6785720b3a086a166a906bcb0a7340545d6 /accessibility | |
parent | 664e64a1901d84137245c14ecfa9432123238bfa (diff) |
reduce scope of local variables
This eliminates some of the warnings from Cppcheck report of
2014-11-29.
Change-Id: Id5bf885de12a6de262d2cca9fa71627ac67f50d9
Reviewed-on: https://gerrit.libreoffice.org/13330
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'accessibility')
-rw-r--r-- | accessibility/source/extended/accessiblelistboxentry.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx index fc296b4eb121..a0aa0a760c21 100644 --- a/accessibility/source/extended/accessiblelistboxentry.cxx +++ b/accessibility/source/extended/accessiblelistboxentry.cxx @@ -460,12 +460,11 @@ namespace accessibility sal_uInt16 iRealItemCount = 0; sal_uInt16 iCount = 0; sal_uInt16 iTotleItemCount = pEntry->ItemCount(); - SvLBoxItem* pItem; while( iCount < iTotleItemCount ) { - pItem = pEntry->GetItem( iCount ); + const SvLBoxItem* pItem = pEntry->GetItem( iCount ); if ( pItem->GetType() == SV_ITEM_ID_LBOXSTRING && - !static_cast<SvLBoxString*>( pItem )->GetText().isEmpty() ) + !static_cast<const SvLBoxString*>( pItem )->GetText().isEmpty() ) { iRealItemCount++; } |