include/tools/inetmime.hxx     |    2 +-
 tools/source/inet/inetmime.cxx |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit e6d60166dbece401d29608d5c9005a882b443baa
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Apr 28 12:57:55 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Apr 28 17:49:28 2022 +0200

    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.gran...@collabora.co.uk>

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))

Reply via email to