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 /fpicker | |
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 'fpicker')
-rw-r--r-- | fpicker/source/office/iodlg.cxx | 2 | ||||
-rw-r--r-- | fpicker/source/win32/workbench/Test_fps.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index 0536a87d411a..00685bc25d7f 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -236,7 +236,7 @@ namespace if ( xProviderProps.is() ) { Reference< XPropertySetInfo > xPropInfo = xProviderProps->getPropertySetInfo(); - static const OUStringLiteral sHomeDirPropertyName( u"HomeDirectory" ); + static constexpr OUStringLiteral sHomeDirPropertyName( u"HomeDirectory" ); if ( !xPropInfo.is() || xPropInfo->hasPropertyByName( sHomeDirPropertyName ) ) { OUString sHomeDirectory; diff --git a/fpicker/source/win32/workbench/Test_fps.cxx b/fpicker/source/win32/workbench/Test_fps.cxx index 899f208f1f61..010a79c3aa55 100644 --- a/fpicker/source/win32/workbench/Test_fps.cxx +++ b/fpicker/source/win32/workbench/Test_fps.cxx @@ -78,7 +78,7 @@ void TestFilterManager( Reference< XFilePicker > xFilePicker ); Reference< XMultiServiceFactory > g_xFactory; -static const OUStringLiteral BMP_EXTENSION( u"bmp" ); +static constexpr OUStringLiteral BMP_EXTENSION( u"bmp" ); // a test client |