From 1aa4df615fa5599d05e9dd5e925b5852676185fa Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 28 Mar 2016 17:12:04 +0200 Subject: 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 Reviewed-by: Noel Grandin --- sw/source/core/doc/fmtcol.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sw') 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( -- cgit