diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-12 10:05:54 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-13 08:10:29 +0000 |
commit | 0f6725454823a5789f3e1c70dad024c46d3f6fc9 (patch) | |
tree | 370646f32cddb69aadf0d9659e90ed8600d43901 /unotools | |
parent | f12b17867ef8fa2cfc2ddb7ecda9d7acc57cfa59 (diff) |
clang-tidy modernize-loop-convert in toolkit to uui
Change-Id: I805aa1389ef8dde158f0b776d6b59579fa3082e4
Reviewed-on: https://gerrit.libreoffice.org/24921
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/config/options.cxx | 4 | ||||
-rw-r--r-- | unotools/source/i18n/localedatawrapper.cxx | 8 | ||||
-rw-r--r-- | unotools/source/misc/fontdefs.cxx | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/unotools/source/config/options.cxx b/unotools/source/config/options.cxx index 28b64bb07119..e336775cf8e1 100644 --- a/unotools/source/config/options.cxx +++ b/unotools/source/config/options.cxx @@ -68,8 +68,8 @@ void ConfigurationBroadcaster::NotifyListeners( sal_uInt32 nHint ) nHint |= m_nBlockedHint; m_nBlockedHint = 0; if ( mpList ) { - for ( size_t n = 0; n < mpList->size(); n++ ) { - (*mpList)[ n ]->ConfigurationChanged( this, nHint ); + for (ConfigurationListener* n : *mpList) { + n->ConfigurationChanged( this, nHint ); } } } diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx index 87a5140d6c88..7204f66392bb 100644 --- a/unotools/source/i18n/localedatawrapper.cxx +++ b/unotools/source/i18n/localedatawrapper.cxx @@ -138,14 +138,14 @@ void LocaleDataWrapper::invalidateData() nCurrPositiveFormat = nCurrNegativeFormat = nCurrDigits = nCurrFormatInvalid; if ( bLocaleDataItemValid ) { - for (sal_Int32 j=0; j<LocaleItem::COUNT; ++j) - aLocaleItem[j].clear(); + for (OUString & j : aLocaleItem) + j.clear(); bLocaleDataItemValid = false; } if ( bReservedWordValid ) { - for ( sal_Int16 j=0; j<reservedWords::COUNT; ++j ) - aReservedWord[j].clear(); + for (OUString & j : aReservedWord) + j.clear(); bReservedWordValid = false; } xDefaultCalendar.reset(); diff --git a/unotools/source/misc/fontdefs.cxx b/unotools/source/misc/fontdefs.cxx index a08941a9cfdf..bce62f590132 100644 --- a/unotools/source/misc/fontdefs.cxx +++ b/unotools/source/misc/fontdefs.cxx @@ -341,10 +341,10 @@ OUString StripScriptFromName(const OUString& _aName) while (!bFinished) { bFinished = true; - for (size_t i = 0; i < SAL_N_ELEMENTS(suffixes); ++i) + for (const char* suffix : suffixes) { - size_t nLen = strlen(suffixes[i]); - if (aName.endsWithIgnoreAsciiCaseAsciiL(suffixes[i], nLen)) + size_t nLen = strlen(suffix); + if (aName.endsWithIgnoreAsciiCaseAsciiL(suffix, nLen)) { bFinished = false; aName = aName.copy(0, aName.getLength() - nLen); |