summaryrefslogtreecommitdiff
path: root/opencl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-12 12:43:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-13 08:38:53 +0200
commitfdfd517a6f75e394ddcb1e195decbfed33ba56b9 (patch)
treee3bff14e5531affcd908415b4e85d7ceac4aa1fd /opencl
parente568c9dca8b93b96a8a130a8fb6f1bba1a33d6ea (diff)
loplugin:stringviewparam whitelist some more functions
for which we have o3tl:: equivalents Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'opencl')
-rw-r--r--opencl/source/openclconfig.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/opencl/source/openclconfig.cxx b/opencl/source/openclconfig.cxx
index 0c3597620d8e..a2b69c175cbf 100644
--- a/opencl/source/openclconfig.cxx
+++ b/opencl/source/openclconfig.cxx
@@ -69,27 +69,27 @@ css::uno::Sequence<OUString> SetOfImplMatcherToStringSequence(const OpenCLConfig
return result;
}
-OUString getToken(const OUString& string, sal_Int32& index)
+OUString getToken(std::u16string_view string, sal_Int32& index)
{
- OUString token(string.getToken(0, '/', index));
+ std::u16string_view token(o3tl::getToken(string, 0, '/', index));
OUStringBuffer result;
sal_Int32 i(0);
- sal_Int32 p;
- while ((p = token.indexOf('%', i)) >= 0)
+ size_t p;
+ while ((p = token.find('%', i)) != std::u16string_view::npos)
{
- if (p > i)
- result.append(token.subView(i, p - i));
- if (p < token.getLength() - 2)
+ if (static_cast<sal_Int32>(p) > i)
+ result.append(token.substr(i, p - i));
+ if (p < token.size() - 2)
{
- result.append(sal_Unicode(o3tl::toInt32(token.subView(p+1, 2), 16)));
+ result.append(sal_Unicode(o3tl::toInt32(token.substr(p+1, 2), 16)));
i = p + 3;
}
else
{
- i = token.getLength();
+ i = token.size();
}
}
- result.append(token.subView(i));
+ result.append(token.substr(i));
return result.makeStringAndClear();
}