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 --- sfx2/source/appl/shutdowniconw32.cxx | 2 +- sfx2/source/view/frmload.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx index 34cfb292c831..ce37d3032b31 100644 --- a/sfx2/source/appl/shutdowniconw32.cxx +++ b/sfx2/source/appl/shutdowniconw32.cxx @@ -180,7 +180,7 @@ static HMENU createSystrayMenu( ) }; // insert the menu entries for launching the applications - for ( size_t i = 0; i < sizeof( aMenuItems ) / sizeof( aMenuItems[0] ); ++i ) + for ( size_t i = 0; i < SAL_N_ELEMENTS(aMenuItems); ++i ) { if ( !aModuleOptions.IsModuleInstalled( aMenuItems[i].eModuleIdentifier ) ) // the complete application is not even installed diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx index d3045287441c..c7eea129ff85 100644 --- a/sfx2/source/view/frmload.cxx +++ b/sfx2/source/view/frmload.cxx @@ -528,13 +528,13 @@ void SfxFrameLoader_Impl::impl_removeLoaderArguments( ::comphelper::NamedValueCo ::comphelper::NamedValueCollection SfxFrameLoader_Impl::impl_extractViewCreationArgs( ::comphelper::NamedValueCollection& io_rDescriptor ) { - const sal_Char* pKnownViewArgs[] = { + static const char* pKnownViewArgs[] = { "JumpMark", "PickListEntry" }; ::comphelper::NamedValueCollection aViewArgs; - for ( size_t i=0; i < sizeof( pKnownViewArgs ) / sizeof( pKnownViewArgs[0] ); ++i ) + for ( size_t i=0; i < SAL_N_ELEMENTS(pKnownViewArgs); ++i ) { if ( io_rDescriptor.has( pKnownViewArgs[i] ) ) { -- cgit tion> LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author