From bc2101646bc6e63944c42500af5a15134b9b2d17 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 12 Apr 2023 10:50:46 +0200 Subject: loplugin:stringviewparam improvements improve the check by checking for methods that exclude using string_view, rather than checking for methods that __can__ use string_view, which leads to exposing some holes in our o3tl/string_view.hxx coverage. Change-Id: Ic9dd60441c671f502692f9cd2a1bb67301c4b960 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150277 Tested-by: Jenkins Reviewed-by: Noel Grandin --- ucb/source/ucp/webdav-curl/ContentProperties.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ucb/source') diff --git a/ucb/source/ucp/webdav-curl/ContentProperties.cxx b/ucb/source/ucp/webdav-curl/ContentProperties.cxx index d78d138ab215..d76c03d7589d 100644 --- a/ucb/source/ucp/webdav-curl/ContentProperties.cxx +++ b/ucb/source/ucp/webdav-curl/ContentProperties.cxx @@ -25,6 +25,7 @@ #include "DateTimeHelper.hxx" #include "webdavprovider.hxx" #include "ContentProperties.hxx" +#include using namespace com::sun::star; using namespace http_dav_ucp; @@ -490,8 +491,7 @@ void ContentProperties::addProperty( const OUString & rName, namespace { - bool isCachable( OUString const & rName, - bool isCaseSensitive ) + bool isCachable( std::u16string_view rName, bool isCaseSensitive ) { const OUString aNonCachableProps [] = { @@ -518,11 +518,11 @@ namespace { if ( isCaseSensitive ) { - if ( rName.equals( aNonCachableProps[ n ] ) ) + if ( rName == aNonCachableProps[ n ] ) return false; } else - if ( rName.equalsIgnoreAsciiCase( aNonCachableProps[ n ] ) ) + if ( o3tl::equalsIgnoreAsciiCase( rName, aNonCachableProps[ n ] ) ) return false; } return true; -- cgit