loplugin:constantparam in i18nlangtag
Change-Id: I3d7cbac7ca58f3de9771a1221196f851255f3fb9 Reviewed-on: https://gerrit.libreoffice.org/23802 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
committed by
Noel Grandin
parent
e0f9bb7952
commit
8372d8532b
@@ -2268,15 +2268,15 @@ LanguageTag & LanguageTag::makeFallback()
|
||||
}
|
||||
|
||||
|
||||
bool LanguageTag::equals( const LanguageTag & rLanguageTag, bool bResolveSystem ) const
|
||||
bool LanguageTag::equals( const LanguageTag & rLanguageTag ) const
|
||||
{
|
||||
// If SYSTEM is not to be resolved or either both are SYSTEM or none, we
|
||||
// can use the operator==() optimization.
|
||||
if (!bResolveSystem || isSystemLocale() == rLanguageTag.isSystemLocale())
|
||||
if (isSystemLocale() == rLanguageTag.isSystemLocale())
|
||||
return operator==( rLanguageTag);
|
||||
|
||||
// Compare full language tag strings.
|
||||
return getBcp47( bResolveSystem) == rLanguageTag.getBcp47( bResolveSystem);
|
||||
return getBcp47() == rLanguageTag.getBcp47();
|
||||
}
|
||||
|
||||
|
||||
|
@@ -361,19 +361,16 @@ public:
|
||||
|
||||
/** Test equality of two LanguageTag, possibly resolving system locale.
|
||||
|
||||
@param bResolveSystem
|
||||
If TRUE, resolve empty language tags denoting the system
|
||||
locale to the real locale used before comparing.
|
||||
If FALSE, the behavior is identical to operator==(), system
|
||||
locales are not resolved first.
|
||||
Resolve empty language tags denoting the system
|
||||
locale to the real locale used before comparing.
|
||||
*/
|
||||
bool equals( const LanguageTag & rLanguageTag, bool bResolveSystem = false ) const;
|
||||
bool equals( const LanguageTag & rLanguageTag ) const;
|
||||
|
||||
/** Test equality of two LanguageTag.
|
||||
|
||||
Does NOT resolve system, i.e. if the system locale is en-US
|
||||
LanguageTag("")==LanguageTag("en-US") returns false! Use
|
||||
equals(...,true) instead if system locales shall be resolved.
|
||||
equals(...) instead if system locales shall be resolved.
|
||||
*/
|
||||
bool operator==( const LanguageTag & rLanguageTag ) const;
|
||||
|
||||
@@ -381,7 +378,7 @@ public:
|
||||
|
||||
Does NOT resolve system, i.e. if the system locale is en-US
|
||||
LanguageTag("")!=LanguageTag("en-US") returns true! Use
|
||||
!equals(,...true) instead if system locales shall be resolved.
|
||||
!equals(,..) instead if system locales shall be resolved.
|
||||
*/
|
||||
bool operator!=( const LanguageTag & rLanguageTag ) const;
|
||||
|
||||
|
@@ -954,7 +954,7 @@ sal_uInt32 SvNumberFormatter::ImpGenerateCL( LanguageType eLnge )
|
||||
if (LocaleDataWrapper::areChecksEnabled())
|
||||
{
|
||||
const LanguageTag& rLoadedLocale = xLocaleData->getLoadedLanguageTag();
|
||||
if ( !rLoadedLocale.equals( maLanguageTag, true) )
|
||||
if ( !rLoadedLocale.equals( maLanguageTag ) )
|
||||
{
|
||||
OUString aMsg("SvNumberFormatter::ImpGenerateCL: locales don't match:");
|
||||
LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg ));
|
||||
|
Reference in New Issue
Block a user