summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-28 12:57:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-28 17:49:28 +0200
commite6d60166dbece401d29608d5c9005a882b443baa (patch)
tree56b25ce958fd99f906488ea2fd639ec3f92e9817
parent6cb72c5fc6f9f10f6e450fb80c043c3afa88bd56 (diff)
use more string_view in tools::INetMIME
Change-Id: I3bfa5a1402835c21ec70b8d995f79a2edaa6577d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133549 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--include/tools/inetmime.hxx2
-rw-r--r--tools/source/inet/inetmime.cxx6
2 files changed, 4 insertions, 4 deletions
diff --git a/include/tools/inetmime.hxx b/include/tools/inetmime.hxx
index a3c7de49690c..3c0fe30ffbde 100644
--- a/include/tools/inetmime.hxx
+++ b/include/tools/inetmime.hxx
@@ -180,7 +180,7 @@ public:
parameters will be modified.
*/
static sal_Unicode const * scanContentType(
- OUString const & rStr,
+ std::u16string_view rStr,
OUString * pType = nullptr, OUString * pSubType = nullptr,
INetContentTypeParameterList * pParameters = nullptr);
diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx
index 85f03cfce3e2..2a57c099c93f 100644
--- a/tools/source/inet/inetmime.cxx
+++ b/tools/source/inet/inetmime.cxx
@@ -1003,11 +1003,11 @@ bool INetMIME::scanUnsigned(const sal_Unicode *& rBegin,
// static
sal_Unicode const * INetMIME::scanContentType(
- OUString const & rStr, OUString * pType,
+ std::u16string_view rStr, OUString * pType,
OUString * pSubType, INetContentTypeParameterList * pParameters)
{
- sal_Unicode const * pBegin = rStr.getStr();
- sal_Unicode const * pEnd = pBegin + rStr.getLength();
+ sal_Unicode const * pBegin = rStr.data();
+ sal_Unicode const * pEnd = pBegin + rStr.size();
sal_Unicode const * p = skipLinearWhiteSpaceComment(pBegin, pEnd);
sal_Unicode const * pTypeBegin = p;
while (p != pEnd && isTokenChar(*p))