summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-01 17:42:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-02 13:31:19 +0200
commit1927b51993fb68907a75765676179b08ab195196 (patch)
tree1b7d09c1b5e7ea945fb6ea618a4c100e8630ebb4 /ucb
parent0dfa444f393a5766d36fe7d2480d0c8ec832e329 (diff)
loplugin:stringviewparam convert methods using indexOf
.. and lastIndexOf, which convert to find and rfind Change-Id: I6c4156cf904774c0d867f85a4c2785dba7593f62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132445 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/webdav-curl/CurlUri.cxx4
-rw-r--r--ucb/source/ucp/webdav-curl/CurlUri.hxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/ucb/source/ucp/webdav-curl/CurlUri.cxx b/ucb/source/ucp/webdav-curl/CurlUri.cxx
index 035c12a132ef..fcd3b652063c 100644
--- a/ucb/source/ucp/webdav-curl/CurlUri.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlUri.cxx
@@ -298,12 +298,12 @@ OUString DecodeURI(OUString const& rURI)
return rtl::Uri::decode(rURI, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8);
}
-OUString ConnectionEndPointString(OUString const& rHostName, sal_uInt16 const nPort)
+OUString ConnectionEndPointString(std::u16string_view rHostName, sal_uInt16 const nPort)
{
OUStringBuffer aBuf;
// Is host a numeric IPv6 address?
- if ((rHostName.indexOf(':') != -1) && (rHostName[0] != '['))
+ if ((rHostName.find(':') != std::u16string_view::npos) && (rHostName[0] != '['))
{
aBuf.append("[");
aBuf.append(rHostName);
diff --git a/ucb/source/ucp/webdav-curl/CurlUri.hxx b/ucb/source/ucp/webdav-curl/CurlUri.hxx
index c9e8d33d279d..56336af78169 100644
--- a/ucb/source/ucp/webdav-curl/CurlUri.hxx
+++ b/ucb/source/ucp/webdav-curl/CurlUri.hxx
@@ -87,7 +87,7 @@ public:
OUString EncodeSegment(OUString const& rSegment);
OUString DecodeURI(OUString const& rURI);
-OUString ConnectionEndPointString(OUString const& rHost, sal_uInt16 nPort);
+OUString ConnectionEndPointString(std::u16string_view rHost, sal_uInt16 nPort);
} // namespace http_dav_ucp