summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-03 14:09:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-03 15:32:53 +0200
commitc5a0b7af847a71fd50f713934b29305f8ce96c6b (patch)
treed7c0193bc183250c36e467f830a4327ab94dc24e /xmlsecurity
parentd19dbcc139d18771e5e20e82a694f1512476e41c (diff)
loplugin:stringadd improvement for appending numbers
I was wrong, the Concat framework already optimised appending numbers by stack-allocating small buffers, so include them in the plugin Change-Id: I922edbdde273c89abfe21d51c5d25dc01c97db25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115037 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/framework/buffernode.cxx4
-rw-r--r--xmlsecurity/source/framework/saxeventkeeperimpl.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/xmlsecurity/source/framework/buffernode.cxx b/xmlsecurity/source/framework/buffernode.cxx
index d966217ee853..cc6c37c18aee 100644
--- a/xmlsecurity/source/framework/buffernode.cxx
+++ b/xmlsecurity/source/framework/buffernode.cxx
@@ -200,7 +200,7 @@ OUString BufferNode::printChildren() const
for( const ElementCollector* ii : m_vElementCollectors )
{
- rc.append("BufID=").append(ii->getBufferId());
+ rc.append("BufID=" + OUString::number(ii->getBufferId()));
if (ii->getModify())
{
@@ -222,7 +222,7 @@ OUString BufferNode::printChildren() const
break;
}
- rc.append("(SecID=").append(ii->getSecurityId()).append(") ");
+ rc.append("(SecID=" + OUString::number(ii->getSecurityId()) + ") ");
}
return rc.makeStringAndClear();
diff --git a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
index 738fec308546..b1d960241702 100644
--- a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
+++ b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
@@ -308,8 +308,8 @@ OUString SAXEventKeeperImpl::printBufferNode(
ElementMark * pBlocker = pBufferNode->getBlocker();
if (pBlocker != nullptr)
{
- rc.append( pBlocker->getBufferId() ).append("(SecId=")
- .append( pBlocker->getSecurityId() ).append(") ");
+ rc.append( OUString::number(pBlocker->getBufferId()) +
+ "(SecId=" + OUString::number( pBlocker->getSecurityId() ) + ") ");
}
rc.append("\n");