summaryrefslogtreecommitdiff
path: root/idlc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-12-20 09:47:06 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-12-20 13:07:02 +0100
commitcf7306194f5c677fef75e3ff5098676ee302359e (patch)
treea52a0980de72c7f70e4f3ae55126579655440773 /idlc
parent24b02a4f2507f40fe9d36c393c59e12c072428c3 (diff)
No longer need to worry about ambiguous operator== in loplugin:stringviewparam
...after 46c5de832868d2812448b2caace3eeaa9237b9f6 "make *String(string_view) constructors explicit" Change-Id: I6e884c762a2fc91f5dd6fbb197a596fd60f17cae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108043 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'idlc')
-rw-r--r--idlc/inc/astscope.hxx6
-rw-r--r--idlc/inc/aststruct.hxx6
-rw-r--r--idlc/source/astscope.cxx2
-rw-r--r--idlc/source/aststruct.cxx2
4 files changed, 12 insertions, 4 deletions
diff --git a/idlc/inc/astscope.hxx b/idlc/inc/astscope.hxx
index 5f6ed53f8df1..2e7e258e2312 100644
--- a/idlc/inc/astscope.hxx
+++ b/idlc/inc/astscope.hxx
@@ -19,6 +19,10 @@
#ifndef INCLUDED_IDLC_INC_ASTSCOPE_HXX
#define INCLUDED_IDLC_INC_ASTSCOPE_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include "idlc.hxx"
class AstExpression;
@@ -43,7 +47,7 @@ public:
// Name look up mechanism
AstDeclaration* lookupByName(const OString& scopedName);
// Look up the identifier 'name' specified only in the local scope
- AstDeclaration* lookupByNameLocal(const OString& name) const;
+ AstDeclaration* lookupByNameLocal(std::string_view name) const;
AstDeclaration* lookupInInherited(const OString& scopedName) const;
diff --git a/idlc/inc/aststruct.hxx b/idlc/inc/aststruct.hxx
index bb5ef15152e2..5e037d1b5a72 100644
--- a/idlc/inc/aststruct.hxx
+++ b/idlc/inc/aststruct.hxx
@@ -19,6 +19,10 @@
#ifndef INCLUDED_IDLC_INC_ASTSTRUCT_HXX
#define INCLUDED_IDLC_INC_ASTSTRUCT_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include "asttype.hxx"
#include "astscope.hxx"
#include "idlctypes.hxx"
@@ -43,7 +47,7 @@ public:
std::size_t getTypeParameterCount() const
{ return m_typeParameters.size(); }
- AstDeclaration const * findTypeParameter(OString const & name) const;
+ AstDeclaration const * findTypeParameter(std::string_view name) const;
virtual bool isType() const override;
diff --git a/idlc/source/astscope.cxx b/idlc/source/astscope.cxx
index 26ebcdb4090a..c77ad48ceb1d 100644
--- a/idlc/source/astscope.cxx
+++ b/idlc/source/astscope.cxx
@@ -185,7 +185,7 @@ AstDeclaration* AstScope::lookupByName(const OString& scopedName)
return pDecl;
}
-AstDeclaration* AstScope::lookupByNameLocal(const OString& name) const
+AstDeclaration* AstScope::lookupByNameLocal(std::string_view name) const
{
for (auto const& declaration : m_declarations)
{
diff --git a/idlc/source/aststruct.cxx b/idlc/source/aststruct.cxx
index e06adc2b2bd1..00ac33021141 100644
--- a/idlc/source/aststruct.cxx
+++ b/idlc/source/aststruct.cxx
@@ -51,7 +51,7 @@ AstStruct::~AstStruct()
{
}
-AstDeclaration const * AstStruct::findTypeParameter(OString const & name)
+AstDeclaration const * AstStruct::findTypeParameter(std::string_view name)
const
{
for (auto const& elem : m_typeParameters)