summaryrefslogtreecommitdiffstats
path: root/cpputools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-09-23 07:31:09 +0200
committerStephan Bergmann <sbergman@redhat.com>2021-09-23 10:15:31 +0200
commit77b23d1b5979ce65058f845f73cb48894ba68325 (patch)
tree1cf82ac98c7e38ff87c26b949e583c8503fcf8db /cpputools
parenttdf#141978: corrects the value assigned to AutoLayout while loading .odp file (diff)
downloadcore-77b23d1b5979ce65058f845f73cb48894ba68325.tar.gz
core-77b23d1b5979ce65058f845f73cb48894ba68325.zip
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')
-rw-r--r--cpputools/source/unoexe/unoexe.cxx5
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;