summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-12-26 09:11:53 +0100
committerMike Kaganski <mike.kaganski@collabora.com>2022-01-02 09:03:32 +0100
commit9f4aad493c7087256d03b01ca3fb18d96f461526 (patch)
tree6db1c950085bd2809cfb2e1ecf9ddcd3537da961 /tools
parent41ee9dcc4e12c32d49294dd4b19a97cb24f8253f (diff)
Introduce OUString::unacquired(const OUStringBuffer&)
... and avoid OUStringBuffer::toString when the temporary is used for checking current buffer content Change-Id: I114178f3e74ca3e4a3e517763f9eaab4797b7deb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127478 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/source/fsys/urlobj.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 0ab541147357..49d0500cabb0 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -2888,8 +2888,7 @@ bool INetURLObject::setHost(std::u16string_view rTheHost,
{
case INetProtocol::File:
{
- OUString sTemp(aSynHost.toString());
- if (sTemp.equalsIgnoreAsciiCase("localhost"))
+ if (OUString::unacquired(aSynHost).equalsIgnoreAsciiCase("localhost"))
{
aSynHost.setLength(0);
}
@@ -3804,8 +3803,7 @@ bool INetURLObject::ConcatData(INetProtocol eTheScheme,
{
case INetProtocol::File:
{
- OUString sTemp(aSynHost.toString());
- if (sTemp.equalsIgnoreAsciiCase( "localhost" ))
+ if (OUString::unacquired(aSynHost).equalsIgnoreAsciiCase( "localhost" ))
{
aSynHost.setLength(0);
}