diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-02-16 18:39:23 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-18 07:41:05 +0100 |
commit | 44841a6778821be3e68ab15819b39064b20e968f (patch) | |
tree | 8e9119cf35764f18f5b008e7758c6f950306fb8c /i18npool | |
parent | Removed executable permission on xlsx file (diff) | |
download | core-44841a6778821be3e68ab15819b39064b20e968f.tar.gz core-44841a6778821be3e68ab15819b39064b20e968f.zip |
Simplify containers iterations in [f-l]*
Use range-based loop or replace with STL functions
Change-Id: Ib3fab47318d1bfbb4df8f886a8cd9596525a420f
Reviewed-on: https://gerrit.libreoffice.org/67914
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/source/characterclassification/characterclassificationImpl.cxx | 4 | ||||
-rw-r--r-- | i18npool/source/localedata/localedata.cxx | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/i18npool/source/characterclassification/characterclassificationImpl.cxx b/i18npool/source/characterclassification/characterclassificationImpl.cxx index b9f008d26930..fda7c6e0cf6d 100644 --- a/i18npool/source/characterclassification/characterclassificationImpl.cxx +++ b/i18npool/source/characterclassification/characterclassificationImpl.cxx @@ -167,9 +167,9 @@ CharacterClassificationImpl::getLocaleSpecificCharacterClassification(const Loca if (!bLoaded) { ::std::vector< OUString > aFallbacks( LocaleDataImpl::getFallbackLocaleServiceNames( rLocale)); - for (::std::vector< OUString >::const_iterator it( aFallbacks.begin()); it != aFallbacks.end(); ++it) + for (const auto& rFallback : aFallbacks) { - bLoaded = createLocaleSpecificCharacterClassification( *it, rLocale); + bLoaded = createLocaleSpecificCharacterClassification(rFallback, rLocale); if (bLoaded) break; } diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index 118781d7a6b4..c4f68f0a319a 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -1459,9 +1459,9 @@ oslGenericFunction LocaleDataImpl::getFunctionSymbol( const Locale& rLocale, con if (!pSymbol) { ::std::vector< OUString > aFallbacks( LocaleDataImpl::getFallbackLocaleServiceNames( rLocale)); - for (::std::vector< OUString >::const_iterator it( aFallbacks.begin()); it != aFallbacks.end(); ++it) + for (const auto& rFallback : aFallbacks) { - pSymbol = rLookupTable.getFunctionSymbolByName( *it, pFunction, &pCachedItem); + pSymbol = rLookupTable.getFunctionSymbolByName(rFallback, pFunction, &pCachedItem); if (pSymbol) break; } @@ -1611,9 +1611,9 @@ OUString LocaleDataImpl::getFirstLocaleServiceName( const css::lang::Locale & rL if (rLocale.Language == I18NLANGTAG_QLT) { aVec = LanguageTag( rLocale).getFallbackStrings( false); - for (::std::vector< OUString >::iterator it(aVec.begin()); it != aVec.end(); ++it) + for (auto& rItem : aVec) { - *it = (*it).replace( cHyphen, cUnder); + rItem = rItem.replace(cHyphen, cUnder); } } else if (!rLocale.Country.isEmpty()) |