diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2016-03-28 17:12:04 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-03-31 08:00:13 +0000 |
commit | 1aa4df615fa5599d05e9dd5e925b5852676185fa (patch) | |
tree | 1f637fa13140941a5775c91f058d0742f911693f /sw | |
parent | 2bd1e7aafeebdfe0e1656ed1ff01762039be5af1 (diff) |
use SAL_N_ELEMENTS in for loops
for with
git grep -n 'for.*sizeof'
Change-Id: I6211024385e03ac5eeeb38690d2c1c699e015c2f
Reviewed-on: https://gerrit.libreoffice.org/23569
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/fmtcol.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sw/source/core/doc/fmtcol.cxx b/sw/source/core/doc/fmtcol.cxx index 464418873842..333e26bb1617 100644 --- a/sw/source/core/doc/fmtcol.cxx +++ b/sw/source/core/doc/fmtcol.cxx @@ -275,8 +275,7 @@ void SwTextFormatColl::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew bContinue = pNewChgSet->GetTheChgdSet() == &GetAttrSet(); } - for( int nC = 0, nArrLen = sizeof(aFontSizeArr) / sizeof( aFontSizeArr[0]); - nC < nArrLen; ++nC ) + for( int nC = 0, nArrLen = SAL_N_ELEMENTS(aFontSizeArr); nC < nArrLen; ++nC ) { const SvxFontHeightItem *pFSize = aFontSizeArr[ nC ], *pOldFSize; if( pFSize && SfxItemState::SET == GetItemState( |