diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-09-23 07:31:09 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-09-23 10:15:31 +0200 |
commit | 77b23d1b5979ce65058f845f73cb48894ba68325 (patch) | |
tree | 1cf82ac98c7e38ff87c26b949e583c8503fcf8db /cpputools/source/unoexe/unoexe.cxx | |
parent | 5bcced4776bb73846ef4f98795e217e4fb923e40 (diff) |
Extend loplugin:stringviewparam to starts/endsWith: cpputools
Change-Id: I016ca2ecf63d62d7799db1098ba0455e337aa3eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122507
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'cpputools/source/unoexe/unoexe.cxx')
-rw-r--r-- | cpputools/source/unoexe/unoexe.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx index 2181e850d7fe..34be8e964ca8 100644 --- a/cpputools/source/unoexe/unoexe.cxx +++ b/cpputools/source/unoexe/unoexe.cxx @@ -22,6 +22,7 @@ #include <sal/main.h> #include <sal/log.hxx> +#include <o3tl/string_view.hxx> #include <osl/diagnose.h> #include <osl/mutex.hxx> #include <osl/conditn.hxx> @@ -126,11 +127,11 @@ static bool readOption( OUString * pValue, const char * pOpt, } static bool readOption( bool * pbOpt, const char * pOpt, - sal_uInt32 * pnIndex, const OUString & aArg) + sal_uInt32 * pnIndex, std::u16string_view aArg) { OUString aOpt = OUString::createFromAscii(pOpt); - if(aArg.startsWith("--") && aOpt == aArg.subView(2)) + if(o3tl::starts_with(aArg, u"--") && aOpt == aArg.substr(2)) { ++(*pnIndex); *pbOpt = true; |