summaryrefslogtreecommitdiff
path: root/officecfg
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-08-13 10:11:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-13 12:13:03 +0200
commite463cc0c8e2582e2cb57ab64a74a6a5cdd9b9787 (patch)
treec4f27f33bce82665cff5f6dcbf295d0939205d5c /officecfg
parentebe01a5f019c6da1aa0dcb46213055f9f8cfdb7b (diff)
less OUString construction on hot path (tdf#105575)
Change-Id: Ieb13bf771b238ed022f1d6164f2e40f92f03af66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120418 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'officecfg')
-rw-r--r--officecfg/registry/cppheader.xsl18
1 files changed, 9 insertions, 9 deletions
diff --git a/officecfg/registry/cppheader.xsl b/officecfg/registry/cppheader.xsl
index 2cabcf330a49..06d76c190425 100644
--- a/officecfg/registry/cppheader.xsl
+++ b/officecfg/registry/cppheader.xsl
@@ -129,12 +129,12 @@
<xsl:text>: public comphelper::ConfigurationGroup&lt; </xsl:text>
<xsl:value-of select="$name"/>
<xsl:text>&gt; {&#xA;</xsl:text>
- <xsl:text> static OUString path() { return OUString(<!--
- -->"</xsl:text>
+ <xsl:text> static OUString path() { static const OUStringLiteral PATH(<!--
+ -->u"</xsl:text>
<xsl:value-of select="$path"/>
<xsl:text>/</xsl:text>
<xsl:value-of select="@oor:name"/>
- <xsl:text>"); }&#xA;</xsl:text>
+ <xsl:text>"); return PATH; }&#xA;</xsl:text>
<xsl:text>&#xA;</xsl:text>
<xsl:apply-templates select="group|set|prop">
<xsl:with-param name="path">
@@ -163,12 +163,12 @@
<xsl:text>: public comphelper::ConfigurationSet&lt; </xsl:text>
<xsl:value-of select="$name"/>
<xsl:text>&gt; {&#xA;</xsl:text>
- <xsl:text> static OUString path() { return OUString(<!--
- -->"</xsl:text>
+ <xsl:text> static OUString path() { static const OUStringLiteral PATH(<!--
+ -->u"</xsl:text>
<xsl:value-of select="$path"/>
<xsl:text>/</xsl:text>
<xsl:value-of select="@oor:name"/>
- <xsl:text>"); }&#xA;</xsl:text>
+ <xsl:text>"); return PATH; }&#xA;</xsl:text>
<xsl:text>private:&#xA;</xsl:text>
<xsl:text> </xsl:text>
<xsl:value-of select="$name"/>
@@ -252,12 +252,12 @@
<xsl:text>&gt; </xsl:text>
</xsl:if>
<xsl:text>&gt; {&#xA;</xsl:text>
- <xsl:text> static OUString path() { return OUString(<!--
- -->"</xsl:text>
+ <xsl:text> static OUString path() { static const OUStringLiteral PATH(<!--
+ -->u"</xsl:text>
<xsl:value-of select="$path"/>
<xsl:text>/</xsl:text>
<xsl:value-of select="@oor:name"/>
- <xsl:text>"); }&#xA;</xsl:text>
+ <xsl:text>"); return PATH; }&#xA;</xsl:text>
<xsl:text>private:&#xA;</xsl:text>
<xsl:text> </xsl:text>
<xsl:value-of select="$name"/>