From e4ff847fe0796420ba8023b70cad8589f5f19e9f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 9 Apr 2022 09:55:12 +0200 Subject: loplugin:stringview check for getToken and trim since we now have o3tl versions of those that work on string_view. Also improve those o3tl functions to support both string_view and u16string_view Change-Id: Iacab2996becec62aa78a5597c52d983bb784749a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132755 Tested-by: Jenkins Reviewed-by: Noel Grandin --- codemaker/source/codemaker/global.cxx | 3 ++- codemaker/source/commoncpp/commoncpp.cxx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'codemaker') diff --git a/codemaker/source/codemaker/global.cxx b/codemaker/source/codemaker/global.cxx index 6d831b45dca8..1310a0b05608 100644 --- a/codemaker/source/codemaker/global.cxx +++ b/codemaker/source/codemaker/global.cxx @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -115,7 +116,7 @@ OString createFileNameFromType( const OString& destination, sal_Int32 nIndex = 0; do { - buffer.append(fileName.getToken(0, token, nIndex)); + buffer.append(o3tl::getToken(fileName, 0, token, nIndex)); if( nIndex == -1 ) break; diff --git a/codemaker/source/commoncpp/commoncpp.cxx b/codemaker/source/commoncpp/commoncpp.cxx index c7dc2bdeb26c..117afaca2c8a 100644 --- a/codemaker/source/commoncpp/commoncpp.cxx +++ b/codemaker/source/commoncpp/commoncpp.cxx @@ -29,6 +29,7 @@ #include #include #include +#include #include @@ -50,7 +51,7 @@ OString scopedCppName(OString const & type, bool ns_alias) nPos = 0; do { - tmpBuf.append("::" + type.getToken(0, c, nPos)); + tmpBuf.append(OString::Concat("::") + o3tl::getToken(type, 0, c, nPos)); } while( nPos != -1 ); OString s(tmpBuf.makeStringAndClear()); -- cgit