diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-28 15:09:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-29 09:05:18 +0200 |
commit | 4c91b89d8ce9c34179f31854dc88bd0a9fa84cba (patch) | |
tree | 1fe9cc9db455779d33c24320fedc1e25888b3e5c /vcl | |
parent | a1f31211920bfae1a21ea375fa5280c9c6595e15 (diff) |
new loplugin:oustringbuffer
look for places where we are appending the temporary result of adding
strings together, to an OUStringBuffer, where we could rather call
append repeatedly and avoid the temporary creation
Change-Id: I481435124291ac7fb54b91a78344a9fe5b379a82
Reviewed-on: https://gerrit.libreoffice.org/59708
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/uitest/logger.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vcl/source/uitest/logger.cxx b/vcl/source/uitest/logger.cxx index be2648ead428..82da48256cc4 100644 --- a/vcl/source/uitest/logger.cxx +++ b/vcl/source/uitest/logger.cxx @@ -57,21 +57,21 @@ void UITestLogger::logCommand(const OUString& rAction, const css::uno::Sequence< { sal_Int32 nValue = 0; rProp.Value >>= nValue; - aBuffer.append("\"" + rProp.Name + "\": "); - aBuffer.append(OUString::number(nValue) + ", "); + aBuffer.append("\"").append(rProp.Name).append("\": "); + aBuffer.append(OUString::number(nValue)).append(", "); } else if (aTypeName == "unsigned long") { sal_uInt32 nValue = 0; rProp.Value >>= nValue; - aBuffer.append("\"" + rProp.Name + "\": "); - aBuffer.append(OUString::number(nValue) + ", "); + aBuffer.append("\"").append(rProp.Name).append("\": "); + aBuffer.append(OUString::number(nValue)).append(", "); } else if (aTypeName == "boolean") { bool bValue = false; rProp.Value >>= bValue; - aBuffer.append("\"" + rProp.Name + "\": "); + aBuffer.append("\"").append(rProp.Name).append("\": "); if (bValue) aBuffer.append("True, "); else @@ -231,7 +231,7 @@ OUString StringMapToOUString(const std::map<OUString, OUString>& rParameters) { if (itr != rParameters.begin()) aParameterString.append(", "); - aParameterString.append("\"" + itr->first + "\": \"" + itr->second + "\""); + aParameterString.append("\"").append(itr->first).append("\": \"").append(itr->second).append("\""); } aParameterString.append("}"); |