From cf7306194f5c677fef75e3ff5098676ee302359e Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sun, 20 Dec 2020 09:47:06 +0100 Subject: 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 --- sdext/source/pdfimport/inc/pdfparse.hxx | 3 ++- sdext/source/pdfimport/pdfparse/pdfentries.cxx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'sdext/source') diff --git a/sdext/source/pdfimport/inc/pdfparse.hxx b/sdext/source/pdfimport/inc/pdfparse.hxx index e255b1bb9a64..abb674a48d22 100644 --- a/sdext/source/pdfimport/inc/pdfparse.hxx +++ b/sdext/source/pdfimport/inc/pdfparse.hxx @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -193,7 +194,7 @@ struct PDFDict : public PDFContainer // from the dictionary void insertValue( const OString& rName, std::unique_ptr pValue ); // removes a name/value pair from the dict - void eraseValue( const OString& rName ); + void eraseValue( std::string_view rName ); // builds new map as of sub elements // returns NULL if successful, else the first offending element PDFEntry* buildMap(); diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx index e7fa4d511982..0789268372e4 100644 --- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx +++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx @@ -550,7 +550,7 @@ void PDFDict::insertValue( const OString& rName, std::unique_ptr pValu m_aMap[ rName ] = pValueTmp; } -void PDFDict::eraseValue( const OString& rName ) +void PDFDict::eraseValue( std::string_view rName ) { unsigned int nEle = m_aSubElements.size(); for( unsigned int i = 0; i < nEle; i++ ) -- cgit