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 --- connectivity/source/commontools/CommonTools.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'connectivity') diff --git a/connectivity/source/commontools/CommonTools.cxx b/connectivity/source/commontools/CommonTools.cxx index 48e91f2fc72d..596be7097d45 100644 --- a/connectivity/source/commontools/CommonTools.cxx +++ b/connectivity/source/commontools/CommonTools.cxx @@ -221,10 +221,10 @@ OUString convertName2SQLName(const OUString& rName, std::u16string_view _rSpecia return aNewName.makeStringAndClear(); } -OUString quoteName(const OUString& _rQuote, const OUString& _rName) +OUString quoteName(std::u16string_view _rQuote, const OUString& _rName) { OUString sName = _rName; - if( !_rQuote.isEmpty() && _rQuote.toChar() != ' ') + if( !_rQuote.empty() && _rQuote[0] != ' ') sName = _rQuote + _rName + _rQuote; return sName; } -- cgit