diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-09 09:55:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-10 12:59:38 +0200 |
commit | e4ff847fe0796420ba8023b70cad8589f5f19e9f (patch) | |
tree | 136786200de69f70dde4190c9725f35fe14b33e0 /codemaker | |
parent | 5a89496ffcfcd561b3e595e01f35e0302fa00841 (diff) |
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'codemaker')
-rw-r--r-- | codemaker/source/codemaker/global.cxx | 3 | ||||
-rw-r--r-- | codemaker/source/commoncpp/commoncpp.cxx | 3 |
2 files changed, 4 insertions, 2 deletions
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 <rtl/ustring.hxx> #include <osl/thread.h> #include <osl/file.hxx> +#include <o3tl/string_view.hxx> #include <string.h> #include <string_view> @@ -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 <rtl/string.hxx> #include <rtl/ustring.hxx> #include <sal/types.h> +#include <o3tl/string_view.hxx> #include <vector> @@ -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()); |