[Libreoffice-commits] core.git: officecfg/registry
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Fri Aug 13 10:13:37 UTC 2021
officecfg/registry/cppheader.xsl | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
New commits:
commit e463cc0c8e2582e2cb57ab64a74a6a5cdd9b9787
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Aug 13 10:11:24 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Aug 13 12:13:03 2021 +0200
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 at collabora.co.uk>
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< </xsl:text>
<xsl:value-of select="$name"/>
<xsl:text>> {
</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>"); }
</xsl:text>
+ <xsl:text>"); return PATH; }
</xsl:text>
<xsl:text>
</xsl:text>
<xsl:apply-templates select="group|set|prop">
<xsl:with-param name="path">
@@ -163,12 +163,12 @@
<xsl:text>: public comphelper::ConfigurationSet< </xsl:text>
<xsl:value-of select="$name"/>
<xsl:text>> {
</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>"); }
</xsl:text>
+ <xsl:text>"); return PATH; }
</xsl:text>
<xsl:text>private:
</xsl:text>
<xsl:text> </xsl:text>
<xsl:value-of select="$name"/>
@@ -252,12 +252,12 @@
<xsl:text>> </xsl:text>
</xsl:if>
<xsl:text>> {
</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>"); }
</xsl:text>
+ <xsl:text>"); return PATH; }
</xsl:text>
<xsl:text>private:
</xsl:text>
<xsl:text> </xsl:text>
<xsl:value-of select="$name"/>
More information about the Libreoffice-commits
mailing list