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 <freedesktop@treblig.org>
This commit is contained in:
committed by
David Gilbert
parent
40436e1dfd
commit
678f732d9c
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user