idlc/source/astdeclaration.cxx |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit e3c0a4eb7d5f7a774f8a6ccef5db19b03e0049a5
Author:     Noel Grandin <[email protected]>
AuthorDate: Wed Apr 27 16:08:41 2022 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Thu Apr 28 11:03:47 2022 +0200

    use more string_view in idlc
    
    Change-Id: Id43d0188c37b0a4d0e7b77a2bb0c95c4411e52c5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133515
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/idlc/source/astdeclaration.cxx b/idlc/source/astdeclaration.cxx
index 8ef76cc1f50e..013e0995a941 100644
--- a/idlc/source/astdeclaration.cxx
+++ b/idlc/source/astdeclaration.cxx
@@ -21,17 +21,18 @@
 #include <astscope.hxx>
 #include <rtl/strbuf.hxx>
 #include <osl/diagnose.h>
+#include <o3tl/string_view.hxx>
 
 constexpr OStringLiteral sGlobal("::");
 
-static OString convertName(const OString& name)
+static OString convertName(std::string_view name)
 {
-    OStringBuffer nameBuffer(name.getLength()+1);
+    OStringBuffer nameBuffer(name.size()+1);
     sal_Int32 nIndex = 0;
     do
     {
-        OString token( name.getToken( 0, ':', nIndex ) );
-        if( !token.isEmpty() )
+        std::string_view token( o3tl::getToken(name, 0, ':', nIndex ) );
+        if( !token.empty() )
         {
             nameBuffer.append('/');
             nameBuffer.append( token );

Reply via email to