diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-02 13:41:56 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-02 16:55:36 +0200 |
commit | c898611bd56a2ea090b2eb46f4d7bd4dd57594a7 (patch) | |
tree | a0c0a84395a972adaee24260443ed18793f3c1b4 /lotuswordpro | |
parent | 12f94913307450aad0e48f6ce06aac9f74807e1a (diff) |
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/benlist.cxx | 4 | ||||
-rw-r--r-- | lotuswordpro/source/filter/first.hxx | 2 |
2 files changed, 3 insertions, 3 deletions
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<CBenNamedObjectListElmt*>(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 |