From e3c0a4eb7d5f7a774f8a6ccef5db19b03e0049a5 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 27 Apr 2022 16:08:41 +0200 Subject: 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 --- idlc/source/astdeclaration.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'idlc') 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 #include #include +#include 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 ); -- cgit v1.2.3