summaryrefslogtreecommitdiff
path: root/idlc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-27 16:08:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-28 11:03:47 +0200
commite3c0a4eb7d5f7a774f8a6ccef5db19b03e0049a5 (patch)
treebfeb3948665ac9ca97cde30c01a832131608a3c9 /idlc
parentb5e838334b57fee1e38febd95f944698059dfe4a (diff)
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'idlc')
-rw-r--r--idlc/source/astdeclaration.cxx9
1 files changed, 5 insertions, 4 deletions
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 );