summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-06-23 12:34:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-06-26 13:12:31 +0200
commit0193b284e880a659ab73160e42238e1d5fe5cf8f (patch)
treeda09299838a6afb43d7c601803a6bab787489854 /sdext
parent2ef138de767c312188d41a7f206234eafac3108b (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 'sdext')
-rw-r--r--sdext/source/minimizer/informationdialog.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sdext/source/minimizer/informationdialog.cxx b/sdext/source/minimizer/informationdialog.cxx
index ad6dc2b74548..dc4b03042895 100644
--- a/sdext/source/minimizer/informationdialog.cxx
+++ b/sdext/source/minimizer/informationdialog.cxx
@@ -83,7 +83,7 @@ void InformationDialog::InitDialog()
aURL.Complete = maSaveAsURL;
xURLTransformer->parseSmart( aURL, OUString() );
- static const OUStringLiteral sFileProtocol( u"file:///" );
+ static constexpr OUStringLiteral sFileProtocol( u"file:///" );
aPresentationURL.Complete = sFileProtocol + aURL.Name;
aTitle = xURLTransformer->getPresentation( aPresentationURL, false );
@@ -93,8 +93,8 @@ void InformationDialog::InitDialog()
OUString sPrimary( getString( STR_INFO_PRIMARY ) );
OUString sSecondary( getString( eInfoString ) );
- static const OUStringLiteral aOldSizePlaceholder( u"%OLDFILESIZE" );
- static const OUStringLiteral aNewSizePlaceholder( u"%NEWFILESIZE" );
+ static constexpr OUStringLiteral aOldSizePlaceholder( u"%OLDFILESIZE" );
+ static constexpr OUStringLiteral aNewSizePlaceholder( u"%NEWFILESIZE" );
const OUString aTitlePlaceholder( !aTitle.isEmpty() ? OUString("%TITLE" )
: OUString("'%TITLE'") );