diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-06-23 12:34:31 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-06-26 13:12:31 +0200 |
commit | 0193b284e880a659ab73160e42238e1d5fe5cf8f (patch) | |
tree | da09299838a6afb43d7c601803a6bab787489854 /linguistic | |
parent | 2ef138de767c312188d41a7f206234eafac3108b (diff) |
new loplugin:constexprliteral
OUStringLiteral should be declared constexpr, to enforce
that it is initialised at compile-time and not runtime.
This seems to make a different at least on Visual Studio
Change-Id: I1698f5fa22ddb480347c2f4d444530c2e0e88d92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153499
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'linguistic')
-rw-r--r-- | linguistic/source/lngsvcmgr.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx index 69e884257e33..ed415ca1e13a 100644 --- a/linguistic/source/lngsvcmgr.cxx +++ b/linguistic/source/lngsvcmgr.cxx @@ -710,10 +710,10 @@ void LngSvcMgr::UpdateAll() void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames ) { - static const OUStringLiteral aSpellCheckerList( u"ServiceManager/SpellCheckerList" ); - static const OUStringLiteral aGrammarCheckerList( u"ServiceManager/GrammarCheckerList" ); - static const OUStringLiteral aHyphenatorList( u"ServiceManager/HyphenatorList" ); - static const OUStringLiteral aThesaurusList( u"ServiceManager/ThesaurusList" ); + static constexpr OUStringLiteral aSpellCheckerList( u"ServiceManager/SpellCheckerList" ); + static constexpr OUStringLiteral aGrammarCheckerList( u"ServiceManager/GrammarCheckerList" ); + static constexpr OUStringLiteral aHyphenatorList( u"ServiceManager/HyphenatorList" ); + static constexpr OUStringLiteral aThesaurusList( u"ServiceManager/ThesaurusList" ); const uno::Sequence< OUString > aSpellCheckerListEntries( GetNodeNames( aSpellCheckerList ) ); const uno::Sequence< OUString > aGrammarCheckerListEntries( GetNodeNames( aGrammarCheckerList ) ); |