summaryrefslogtreecommitdiff
path: root/i18npool/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-12-22 14:08:08 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-12-27 11:26:32 +0100
commit9013dc1650aa8400f63da5f584df9058b1740eb3 (patch)
treea1ba4f196070459d5d823d942e5a0a121b09ea3d /i18npool/source
parentdb97e00893c204226a2eab2d95c9837bce3cddb0 (diff)
Simplify loplugin:stringviewparam comparison operator handling
In practice, it works fine to look at all of them, regardless of actual argument types. Change-Id: Ifc49cbcd6003c8837c1b3f81d432c59fb0657bf1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108366 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'i18npool/source')
-rw-r--r--i18npool/source/indexentry/indexentrysupplier_default.cxx2
-rw-r--r--i18npool/source/localedata/localedata.cxx10
2 files changed, 6 insertions, 6 deletions
diff --git a/i18npool/source/indexentry/indexentrysupplier_default.cxx b/i18npool/source/indexentry/indexentrysupplier_default.cxx
index 399b19b17382..519c99ce860e 100644
--- a/i18npool/source/indexentry/indexentrysupplier_default.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier_default.cxx
@@ -165,7 +165,7 @@ OUString Index::getIndexDescription(const OUString& rIndexEntry)
#define LOCALE_EN lang::Locale("en", OUString(), OUString())
-void Index::makeIndexKeys(const lang::Locale &rLocale, const OUString &algorithm)
+void Index::makeIndexKeys(const lang::Locale &rLocale, std::u16string_view algorithm)
{
OUString keyStr = LocaleDataImpl::get()->getIndexKeysByAlgorithm(rLocale, algorithm);
diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx
index ac4950741129..273415d9461e 100644
--- a/i18npool/source/localedata/localedata.cxx
+++ b/i18npool/source/localedata/localedata.cxx
@@ -922,7 +922,7 @@ LocaleDataImpl::getDateAcceptancePatterns( const Locale& rLocale )
#define COLLATOR_ELEMENTS 3
OUString
-LocaleDataImpl::getCollatorRuleByAlgorithm( const Locale& rLocale, const OUString& algorithm )
+LocaleDataImpl::getCollatorRuleByAlgorithm( const Locale& rLocale, std::u16string_view algorithm )
{
MyFunc_Type func = reinterpret_cast<MyFunc_Type>(getFunctionSymbol( rLocale, "getCollatorImplementation" ));
if ( func ) {
@@ -1059,7 +1059,7 @@ LocaleDataImpl::hasPhonetic( const Locale& rLocale )
}
sal_Unicode **
-LocaleDataImpl::getIndexArrayForAlgorithm(const Locale& rLocale, const OUString& algorithm)
+LocaleDataImpl::getIndexArrayForAlgorithm(const Locale& rLocale, std::u16string_view algorithm)
{
sal_Int16 indexCount = 0;
sal_Unicode **indexArray = getIndexArray(rLocale, indexCount);
@@ -1073,21 +1073,21 @@ LocaleDataImpl::getIndexArrayForAlgorithm(const Locale& rLocale, const OUString&
}
bool
-LocaleDataImpl::isPhonetic( const Locale& rLocale, const OUString& algorithm )
+LocaleDataImpl::isPhonetic( const Locale& rLocale, std::u16string_view algorithm )
{
sal_Unicode **indexArray = getIndexArrayForAlgorithm(rLocale, algorithm);
return indexArray && indexArray[4][0];
}
OUString
-LocaleDataImpl::getIndexKeysByAlgorithm( const Locale& rLocale, const OUString& algorithm )
+LocaleDataImpl::getIndexKeysByAlgorithm( const Locale& rLocale, std::u16string_view algorithm )
{
sal_Unicode **indexArray = getIndexArrayForAlgorithm(rLocale, algorithm);
return indexArray ? (OUString::Concat(u"0-9") + indexArray[2]) : OUString();
}
OUString
-LocaleDataImpl::getIndexModuleByAlgorithm( const Locale& rLocale, const OUString& algorithm )
+LocaleDataImpl::getIndexModuleByAlgorithm( const Locale& rLocale, std::u16string_view algorithm )
{
sal_Unicode **indexArray = getIndexArrayForAlgorithm(rLocale, algorithm);
return indexArray ? OUString(indexArray[1]) : OUString();