summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-20 09:32:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-20 12:04:41 +0200
commit07f9223daae92ac11be2382ecd0095e744f5695f (patch)
tree553f162c88e1d30dd7946daf62c0db7acb9a0469 /i18npool
parent6fea13e7a10272922ffdf74b65add10ecf8cec38 (diff)
loplugin:constvars in i18npool..opencl
Change-Id: I82738a18ff116fdc78f07b453c93b1b631632caf Reviewed-on: https://gerrit.libreoffice.org/77775 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/breakiterator/breakiteratorImpl.cxx4
-rw-r--r--i18npool/source/breakiterator/xdictionary.cxx4
-rw-r--r--i18npool/source/characterclassification/characterclassificationImpl.cxx2
-rw-r--r--i18npool/source/collator/collatorImpl.cxx2
-rw-r--r--i18npool/source/inputchecker/inputsequencechecker.cxx2
-rw-r--r--i18npool/source/localedata/localedata.cxx4
6 files changed, 9 insertions, 9 deletions
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx
index bc52262b1d08..21cdfce9c499 100644
--- a/i18npool/source/breakiterator/breakiteratorImpl.cxx
+++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx
@@ -531,7 +531,7 @@ sal_Int16 BreakIteratorImpl::getScriptClass(sal_uInt32 currentChar)
bool BreakIteratorImpl::createLocaleSpecificBreakIterator(const OUString& aLocaleName)
{
// to share service between same Language but different Country code, like zh_CN and zh_TW
- for (lookupTableItem& listItem : lookupTable) {
+ for (const lookupTableItem& listItem : lookupTable) {
if (aLocaleName == listItem.aLocale.Language) {
xBI = listItem.xBI;
return true;
@@ -576,7 +576,7 @@ BreakIteratorImpl::getLocaleSpecificBreakIterator(const Locale& rLocale)
else if (m_xContext.is()) {
aLocale = rLocale;
- for (lookupTableItem& listItem : lookupTable) {
+ for (const lookupTableItem& listItem : lookupTable) {
if (rLocale == listItem.aLocale)
return xBI = listItem.xBI;
}
diff --git a/i18npool/source/breakiterator/xdictionary.cxx b/i18npool/source/breakiterator/xdictionary.cxx
index c905f67d4685..f21e377c68c0 100644
--- a/i18npool/source/breakiterator/xdictionary.cxx
+++ b/i18npool/source/breakiterator/xdictionary.cxx
@@ -127,7 +127,7 @@ xdictionary::xdictionary(const sal_Char *lang) :
xdictionary::~xdictionary()
{
- for (WordBreakCache & i : cache) {
+ for (const WordBreakCache & i : cache) {
if (i.size > 0) {
delete [] i.contents;
delete [] i.wordboundary;
@@ -151,7 +151,7 @@ void xdictionary::initDictionaryData(const sal_Char *pLang)
static std::vector< datacache > aLoadedCache;
osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() );
- for(datacache & i : aLoadedCache)
+ for(const datacache & i : aLoadedCache)
{
if( i.maLang != pLang )
{
diff --git a/i18npool/source/characterclassification/characterclassificationImpl.cxx b/i18npool/source/characterclassification/characterclassificationImpl.cxx
index f66a4b26085d..721c82bf9304 100644
--- a/i18npool/source/characterclassification/characterclassificationImpl.cxx
+++ b/i18npool/source/characterclassification/characterclassificationImpl.cxx
@@ -155,7 +155,7 @@ CharacterClassificationImpl::getLocaleSpecificCharacterClassification(const Loca
if (cachedItem && cachedItem->equals(rLocale))
return cachedItem->xCI;
else {
- for (auto & i : lookupTable) {
+ for (const auto & i : lookupTable) {
cachedItem = i.get();
if (cachedItem->equals(rLocale))
return cachedItem->xCI;
diff --git a/i18npool/source/collator/collatorImpl.cxx b/i18npool/source/collator/collatorImpl.cxx
index f072adbb192a..155b271b1b46 100644
--- a/i18npool/source/collator/collatorImpl.cxx
+++ b/i18npool/source/collator/collatorImpl.cxx
@@ -164,7 +164,7 @@ CollatorImpl::createCollator(const lang::Locale& rLocale, const OUString& servic
void
CollatorImpl::loadCachedCollator(const lang::Locale& rLocale, const OUString& rSortAlgorithm)
{
- for (auto& i : lookupTable) {
+ for (const auto& i : lookupTable) {
cachedItem = i.get();
if (cachedItem->equals(rLocale, rSortAlgorithm)) {
return;
diff --git a/i18npool/source/inputchecker/inputsequencechecker.cxx b/i18npool/source/inputchecker/inputsequencechecker.cxx
index 3989cb74c9ad..46e7f9def6fc 100644
--- a/i18npool/source/inputchecker/inputsequencechecker.cxx
+++ b/i18npool/source/inputchecker/inputsequencechecker.cxx
@@ -108,7 +108,7 @@ InputSequenceCheckerImpl::getInputSequenceChecker(sal_Char const * rLanguage)
return cachedItem->xISC;
}
else {
- for (auto& l : lookupTable) {
+ for (const auto& l : lookupTable) {
cachedItem = l.get();
if (cachedItem->aLanguage == rLanguage)
return cachedItem->xISC;
diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx
index 433b34c72de3..4a46025aa2f0 100644
--- a/i18npool/source/localedata/localedata.cxx
+++ b/i18npool/source/localedata/localedata.cxx
@@ -509,7 +509,7 @@ lcl_LookupTableHelper::lcl_LookupTableHelper()
lcl_LookupTableHelper::~lcl_LookupTableHelper()
{
- for ( LocaleDataLookupTableItem& item : maLookupTable ) {
+ for ( const LocaleDataLookupTableItem& item : maLookupTable ) {
delete item.module;
}
}
@@ -879,7 +879,7 @@ LocaleDataImpl::getAllFormats( const Locale& rLocale )
Sequence< FormatElement > seq(formatCount);
sal_Int32 f = 0;
- for (FormatSection & s : section)
+ for (const FormatSection & s : section)
{
sal_Unicode const * const * const formatArray = s.formatArray;
if ( formatArray )