xmloff/source/text/txtlists.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
New commits: commit 678f732d9cc5b9a73e633d77bd2d1ae34700ed3d Author: Simon Chenery <[email protected]> AuthorDate: Sat Nov 23 15:07:14 2024 +0100 Commit: David Gilbert <[email protected]> CommitDate: Fri Nov 29 01:37:10 2024 +0100 tdf#158237 Use C++20 contains() instead of find() and end() Change-Id: I596245603c0945438a940465122cb4c3e6954e81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177140 Tested-by: Jenkins Reviewed-by: David Gilbert <[email protected]> diff --git a/xmloff/source/text/txtlists.cxx b/xmloff/source/text/txtlists.cxx index 4cbd7874050b..3b81ce6d094d 100644 --- a/xmloff/source/text/txtlists.cxx +++ b/xmloff/source/text/txtlists.cxx @@ -138,8 +138,7 @@ void XMLTextListsHelper::KeepListAsProcessed( const OUString& sListId, mpMapListIdToListStyleDefaultListId = std::make_unique<tMapForLists>(); } - if ( mpMapListIdToListStyleDefaultListId->find( sListStyleName ) == - mpMapListIdToListStyleDefaultListId->end() ) + if ( !mpMapListIdToListStyleDefaultListId->contains( sListStyleName ) ) { (*mpMapListIdToListStyleDefaultListId)[ sListStyleName ] = ::std::pair<OUString, OUString>(sListId, sListStyleDefaultListId); @@ -153,7 +152,7 @@ bool XMLTextListsHelper::IsListProcessed( const OUString& sListId ) const return false; } - return mpProcessedLists->find( sListId ) != mpProcessedLists->end(); + return mpProcessedLists->contains( sListId ); } const OUString & XMLTextListsHelper::GetListStyleOfProcessedList( @@ -212,7 +211,7 @@ OUString XMLTextListsHelper::GenerateNewListId() const if ( mpProcessedLists ) { tools::Long nHitCount = 0; - while ( mpProcessedLists->find( sNewListId ) != mpProcessedLists->end() ) + while ( mpProcessedLists->contains( sNewListId ) ) { ++nHitCount; sNewListId = sTmpStr + OUString::number( nHitCount );
