summaryrefslogtreecommitdiff
path: root/include/comphelper
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-03-30 16:10:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-03-30 20:03:41 +0000
commitdb7f33af1438538bb51b376242294ecd3bfcb055 (patch)
tree8e5d6139159130326a4eddaa64406224f5bc9816 /include/comphelper
parent7d8ffcc587dc54764e3fc67b8622b7b0c088297e (diff)
loplugin:stringadd in various
when applying my upcoming patch to also consider O[U]StringBuffer Change-Id: I8cf6a47ad357ddc73e2c430d966be72d5efd1485 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149767 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/comphelper')
-rw-r--r--include/comphelper/traceevent.hxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/include/comphelper/traceevent.hxx b/include/comphelper/traceevent.hxx
index a0fe9cae1d16..6409c43eee4a 100644
--- a/include/comphelper/traceevent.hxx
+++ b/include/comphelper/traceevent.hxx
@@ -63,18 +63,13 @@ protected:
if (args.size() == 0)
return "";
- OUStringBuffer sResult;
- sResult.append(",\"args\":{");
+ OUStringBuffer sResult(",\"args\":{");
bool first = true;
for (auto& i : args)
{
if (!first)
sResult.append(',');
- sResult.append('"');
- sResult.append(i.first);
- sResult.append("\":\"");
- sResult.append(i.second);
- sResult.append('"');
+ sResult.append("\"" + i.first + "\":\"" + i.second + "\"");
first = false;
}
sResult.append('}');