From e266d448f45348f27f8291ea5d0542747d7c8168 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 26 Jun 2023 16:16:19 +0200 Subject: loplugin:stringstatic look for more strings that can be initialised at compile-time instead of runtime Change-Id: I08d516fdc13a3a79f93c079f89ac44cbc7a1ed71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153620 Tested-by: Jenkins Reviewed-by: Noel Grandin --- unotools/source/config/fontcfg.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'unotools') diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx index beeba82030d0..26ceda82d5fa 100644 --- a/unotools/source/config/fontcfg.cxx +++ b/unotools/source/config/fontcfg.cxx @@ -994,11 +994,11 @@ void FontSubstConfiguration::readLocaleSubst( const OUString& rBcp47 ) const it->second.aSubstAttributes.reserve( nFonts ); // strings for subst retrieval, construct only once - OUString const aSubstFontsStr ( "SubstFonts" ); - OUString const aSubstFontsMSStr ( "SubstFontsMS" ); - OUString const aSubstWeightStr ( "FontWeight" ); - OUString const aSubstWidthStr ( "FontWidth" ); - OUString const aSubstTypeStr ( "FontType" ); + static constexpr OUStringLiteral aSubstFontsStr ( u"SubstFonts" ); + static constexpr OUStringLiteral aSubstFontsMSStr( u"SubstFontsMS" ); + static constexpr OUStringLiteral aSubstWeightStr ( u"FontWeight" ); + static constexpr OUStringLiteral aSubstWidthStr ( u"FontWidth" ); + static constexpr OUStringLiteral aSubstTypeStr ( u"FontType" ); for( const OUString& rFontName : aFonts ) { Reference< XNameAccess > xFont; -- cgit