diff options
Diffstat (limited to 'unotools/source/config/pathoptions.cxx')
-rw-r--r-- | unotools/source/config/pathoptions.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/unotools/source/config/pathoptions.cxx b/unotools/source/config/pathoptions.cxx index 7b42f63b98fe..d6675cd31333 100644 --- a/unotools/source/config/pathoptions.cxx +++ b/unotools/source/config/pathoptions.cxx @@ -416,26 +416,23 @@ SvtPathOptions_Impl::SvtPathOptions_Impl() : } // Create mapping between internal enum (SvtPathOptions::Paths) and property handle - sal_Int32 nCount = sizeof( aPropNames ) / sizeof( PropertyStruct ); - sal_Int32 i; - for ( i = 0; i < nCount; i++ ) + for ( auto const & p : aPropNames ) { NameToHandleMap::const_iterator pIter = - aTempHashMap.find( OUString::createFromAscii( aPropNames[i].pPropName )); + aTempHashMap.find( OUString::createFromAscii( p.pPropName )); if ( pIter != aTempHashMap.end() ) { sal_Int32 nHandle = pIter->second; - sal_Int32 nEnum = aPropNames[i].ePath; + sal_Int32 nEnum = p.ePath; m_aMapEnumToPropHandle.insert( EnumToHandleMap::value_type( nEnum, nHandle )); } } // Create hash map for path variables that need a system path as a return value! - nCount = sizeof( aVarNameAttribute ) / sizeof( VarNameAttribute ); - for ( i = 0; i < nCount; i++ ) + for ( auto const & i : aVarNameAttribute ) { - m_aSystemPathVarNames.insert( OUString::createFromAscii( aVarNameAttribute[i].pVarName ) ); + m_aSystemPathVarNames.insert( OUString::createFromAscii( i.pVarName ) ); } } |