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 /svtools | |
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 'svtools')
-rw-r--r-- | svtools/source/control/ctrltool.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx index 90f912746cde..d061c2773e3f 100644 --- a/svtools/source/control/ctrltool.cxx +++ b/svtools/source/control/ctrltool.cxx @@ -166,7 +166,7 @@ static OUString ImplMakeSearchStringFromName(const OUString& rStr) return ImplMakeSearchString(rStr.getToken( 0, ';' )); } -ImplFontListNameInfo* FontList::ImplFind(const OUString& rSearchName, sal_uInt32* pIndex) const +ImplFontListNameInfo* FontList::ImplFind(std::u16string_view rSearchName, sal_uInt32* pIndex) const { // Append if there is no entry in the list or if the entry is larger // then the last one. We only compare to the last entry as the list of VCL @@ -181,7 +181,7 @@ ImplFontListNameInfo* FontList::ImplFind(const OUString& rSearchName, sal_uInt32 else { const ImplFontListNameInfo* pCmpData = m_Entries.back().get(); - sal_Int32 nComp = rSearchName.compareTo( pCmpData->maSearchName ); + sal_Int32 nComp = rSearchName.compare( pCmpData->maSearchName ); if (nComp > 0) { if ( pIndex ) @@ -203,7 +203,7 @@ ImplFontListNameInfo* FontList::ImplFind(const OUString& rSearchName, sal_uInt32 { nMid = (nLow + nHigh) / 2; pCompareData = m_Entries[nMid].get(); - sal_Int32 nComp = rSearchName.compareTo(pCompareData->maSearchName); + sal_Int32 nComp = rSearchName.compare(pCompareData->maSearchName); if (nComp < 0) { if ( !nMid ) @@ -225,7 +225,7 @@ ImplFontListNameInfo* FontList::ImplFind(const OUString& rSearchName, sal_uInt32 if ( pIndex ) { - sal_Int32 nComp = rSearchName.compareTo(pCompareData->maSearchName); + sal_Int32 nComp = rSearchName.compare(pCompareData->maSearchName); if (nComp > 0) *pIndex = (nMid+1); else |