c++20: use std::erase(_if) instead of std::remove(_if)+erase (svl 2)

Change-Id: I55c85a02e9dfc7d7cd2aaaec726fc5877a847264
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159849
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
This commit is contained in:
Julien Nabet
2023-11-23 10:04:27 +01:00
parent 2da3c1f0bf
commit cb753911e3

View File

@@ -392,7 +392,7 @@ DdeService::~DdeService()
DdeInstData* pInst = ImpGetInstData();
assert(pInst);
if ( pInst->pServicesSvr )
pInst->pServicesSvr->erase(std::remove(pInst->pServicesSvr->begin(), pInst->pServicesSvr->end(), this), pInst->pServicesSvr->end());
std::erase(*pInst->pServicesSvr, this);
delete pSysTopic;
delete pName;
@@ -608,8 +608,7 @@ DdeItem::DdeItem( const DdeItem& r)
DdeItem::~DdeItem()
{
if( pMyTopic )
pMyTopic->aItems.erase(std::remove(pMyTopic->aItems.begin(),
pMyTopic->aItems.end(),this));
std::erase(pMyTopic->aItems, this);
delete pName;
delete pImpData;
}