summaryrefslogtreecommitdiff
path: root/officecfg
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 /officecfg
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 'officecfg')
-rw-r--r--officecfg/registry/cppheader.xsl6
1 files changed, 3 insertions, 3 deletions
diff --git a/officecfg/registry/cppheader.xsl b/officecfg/registry/cppheader.xsl
index 06d76c190425..78e3bb05a10e 100644
--- a/officecfg/registry/cppheader.xsl
+++ b/officecfg/registry/cppheader.xsl
@@ -129,7 +129,7 @@
<xsl:text>: public comphelper::ConfigurationGroup&lt; </xsl:text>
<xsl:value-of select="$name"/>
<xsl:text>&gt; {&#xA;</xsl:text>
- <xsl:text> static OUString path() { static const OUStringLiteral PATH(<!--
+ <xsl:text> static OUString path() { static constexpr OUStringLiteral PATH(<!--
-->u"</xsl:text>
<xsl:value-of select="$path"/>
<xsl:text>/</xsl:text>
@@ -163,7 +163,7 @@
<xsl:text>: public comphelper::ConfigurationSet&lt; </xsl:text>
<xsl:value-of select="$name"/>
<xsl:text>&gt; {&#xA;</xsl:text>
- <xsl:text> static OUString path() { static const OUStringLiteral PATH(<!--
+ <xsl:text> static OUString path() { static constexpr OUStringLiteral PATH(<!--
-->u"</xsl:text>
<xsl:value-of select="$path"/>
<xsl:text>/</xsl:text>
@@ -252,7 +252,7 @@
<xsl:text>&gt; </xsl:text>
</xsl:if>
<xsl:text>&gt; {&#xA;</xsl:text>
- <xsl:text> static OUString path() { static const OUStringLiteral PATH(<!--
+ <xsl:text> static OUString path() { static constexpr OUStringLiteral PATH(<!--
-->u"</xsl:text>
<xsl:value-of select="$path"/>
<xsl:text>/</xsl:text>