summaryrefslogtreecommitdiff
path: root/sal/qa
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 /sal/qa
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 'sal/qa')
-rw-r--r--sal/qa/rtl/process/rtl_Process.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sal/qa/rtl/process/rtl_Process.cxx b/sal/qa/rtl/process/rtl_Process.cxx
index 5d4f3e5b52c0..346e31436dd4 100644
--- a/sal/qa/rtl/process/rtl_Process.cxx
+++ b/sal/qa/rtl/process/rtl_Process.cxx
@@ -69,9 +69,9 @@ public:
void getAppCommandArg_001()
{
#if defined(_WIN32)
- static const OUStringLiteral EXECUTABLE_NAME(u"child_process.exe");
+ static constexpr OUStringLiteral EXECUTABLE_NAME(u"child_process.exe");
#else
- static const OUStringLiteral EXECUTABLE_NAME(u"child_process");
+ static constexpr OUStringLiteral EXECUTABLE_NAME(u"child_process");
#endif
OUString suCWD = getModulePath();
// OUString suCWD2 = getExecutableDirectory();
@@ -198,9 +198,9 @@ public:
void getGlobalProcessId_002()
{
#if defined(_WIN32)
- static const OUStringLiteral EXEC_NAME(u"child_process_id.exe");
+ static constexpr OUStringLiteral EXEC_NAME(u"child_process_id.exe");
#else
- static const OUStringLiteral EXEC_NAME(u"child_process_id");
+ static constexpr OUStringLiteral EXEC_NAME(u"child_process_id");
#endif
sal_uInt8 pTargetUUID1[16];
rtl_getGlobalProcessId( pTargetUUID1 );