diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-09-22 22:19:43 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-09-23 07:27:14 +0200 |
commit | 4706eb93350b2613b1fe6b98afa1243415c40577 (patch) | |
tree | cc6fc582dae595e3db107234bb73901b287a989b /idlc/source/astscope.cxx | |
parent | 310d43b9a27efc36f2c9e6737a0b5ac3f211bda0 (diff) |
Extend loplugin:stringviewparam to starts/endsWith: idlc
Change-Id: Ib9c97576746b6acfddeacec658a2ae994aa28516
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122497
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'idlc/source/astscope.cxx')
-rw-r--r-- | idlc/source/astscope.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/idlc/source/astscope.cxx b/idlc/source/astscope.cxx index d4c0f954367c..ca6214129c87 100644 --- a/idlc/source/astscope.cxx +++ b/idlc/source/astscope.cxx @@ -20,17 +20,19 @@ #include <sal/config.h> #include <algorithm> +#include <string_view> #include <astscope.hxx> #include <astbasetype.hxx> #include <astinterface.hxx> #include <errorhandler.hxx> +#include <o3tl/string_view.hxx> #include <osl/diagnose.h> -static bool isGlobal(const OString& scopedName) +static bool isGlobal(std::string_view scopedName) { - return scopedName.isEmpty() || scopedName.startsWith(":"); + return scopedName.empty() || o3tl::starts_with(scopedName, ":"); } AstScope::AstScope(NodeType nodeType) |