From c898611bd56a2ea090b2eb46f4d7bd4dd57594a7 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 2 Apr 2022 13:41:56 +0200 Subject: loplugin:stringviewparam convert methods using compareTo which converts to compare Change-Id: If03c790ea113a7caedbe89f926b29055c9ec1e76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132455 Tested-by: Jenkins Reviewed-by: Noel Grandin --- lotuswordpro/source/filter/benlist.cxx | 4 ++-- lotuswordpro/source/filter/first.hxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lotuswordpro') diff --git a/lotuswordpro/source/filter/benlist.cxx b/lotuswordpro/source/filter/benlist.cxx index 8757cce41ce8..1972254fe98b 100644 --- a/lotuswordpro/source/filter/benlist.cxx +++ b/lotuswordpro/source/filter/benlist.cxx @@ -56,7 +56,7 @@ #include "first.hxx" namespace OpenStormBento { -CBenNamedObject* FindNamedObject(CUtList* pList, const OString& rName, CUtListElmt** ppPrev) +CBenNamedObject* FindNamedObject(CUtList* pList, std::string_view rName, CUtListElmt** ppPrev) { CUtListElmt& rTerminating = pList->GetTerminating(); for (CUtListElmt* pCurr = pList->GetLast(); pCurr != &rTerminating; pCurr = pCurr->GetPrev()) @@ -64,7 +64,7 @@ CBenNamedObject* FindNamedObject(CUtList* pList, const OString& rName, CUtListEl CBenNamedObjectListElmt* pCurrNamedObjectListElmt = static_cast(pCurr); - sal_Int32 Comp = rName.compareTo(pCurrNamedObjectListElmt->GetNamedObject()->GetName()); + sal_Int32 Comp = rName.compare(pCurrNamedObjectListElmt->GetNamedObject()->GetName()); if (Comp == 0) return pCurrNamedObjectListElmt->GetNamedObject(); diff --git a/lotuswordpro/source/filter/first.hxx b/lotuswordpro/source/filter/first.hxx index 9acf487ed380..78b6181ff09a 100644 --- a/lotuswordpro/source/filter/first.hxx +++ b/lotuswordpro/source/filter/first.hxx @@ -64,7 +64,7 @@ namespace OpenStormBento // String constants extern const char gsBenMagicBytes[]; -CBenNamedObject* FindNamedObject(CUtList* pList, const OString& rName, CUtListElmt** ppPrev); +CBenNamedObject* FindNamedObject(CUtList* pList, std::string_view rName, CUtListElmt** ppPrev); CBenIDListElmt* FindID(CUtList* pList, BenObjectID ObjectID, CUtListElmt** ppPrev); } // end namespace -- cgit