summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2014-06-28 10:48:29 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2014-06-28 11:17:57 +0200
commit53e3cfdcd35cb4bc934975d233b0e8d24c8af9b1 (patch)
tree3f033232eacb7f3564503e5be3bc03a6fd04b523 /sw
parent540eba75564e2c04d6a13677ac87d10907bd422d (diff)
Micro optimizations: pre-increment and constify
Change-Id: Icefef960e1ecc0f6529e8f1b5f903c676b62e154
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/utlui/tmplctrl.cxx5
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