diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-06-28 10:48:29 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-06-28 11:17:57 +0200 |
commit | 53e3cfdcd35cb4bc934975d233b0e8d24c8af9b1 (patch) | |
tree | 3f033232eacb7f3564503e5be3bc03a6fd04b523 /sw | |
parent | 540eba75564e2c04d6a13677ac87d10907bd422d (diff) |
Micro optimizations: pre-increment and constify
Change-Id: Icefef960e1ecc0f6529e8f1b5f903c676b62e154
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/utlui/tmplctrl.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/uibase/utlui/tmplctrl.cxx b/sw/source/uibase/utlui/tmplctrl.cxx index 0f774e395fbc..d86eadba4464 100644 --- a/sw/source/uibase/utlui/tmplctrl.cxx +++ b/sw/source/uibase/utlui/tmplctrl.cxx @@ -110,13 +110,12 @@ void SwTemplateControl::Command( const CommandEvent& rCEvt ) SfxStyleSheetBase* pStyle = pPool->First(); while( pStyle ) { - nCount++; - aPop.InsertItem( nCount, pStyle->GetName() ); + aPop.InsertItem( ++nCount, pStyle->GetName() ); pStyle = pPool->Next(); } aPop.Execute( &GetStatusBar(), rCEvt.GetMousePosPixel()); - sal_uInt16 nCurrId = aPop.GetCurId(); + const sal_uInt16 nCurrId = aPop.GetCurId(); if( nCurrId != USHRT_MAX) { // looks a bit awkward, but another way is not possible |