c++20: use std::erase instead of std::removed followed by erase (part 1)
Change-Id: I8d038fc37a4de25bdeff2e2cc55775e3981240b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159610 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
This commit is contained in:
parent
79d9195b95
commit
c05595d242
@ -1288,7 +1288,7 @@ void DlgEdForm::AddChild( DlgEdObj* pDlgEdObj )
|
|||||||
|
|
||||||
void DlgEdForm::RemoveChild( DlgEdObj* pDlgEdObj )
|
void DlgEdForm::RemoveChild( DlgEdObj* pDlgEdObj )
|
||||||
{
|
{
|
||||||
pChildren.erase( std::remove( pChildren.begin() , pChildren.end() , pDlgEdObj ) );
|
std::erase(pChildren, pDlgEdObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DlgEdForm::PositionAndSizeChange( const beans::PropertyChangeEvent& evt )
|
void DlgEdForm::PositionAndSizeChange( const beans::PropertyChangeEvent& evt )
|
||||||
|
@ -1074,7 +1074,7 @@ void StarBASIC::Remove( SbxVariable* pVar )
|
|||||||
{
|
{
|
||||||
// #87540 Can be last reference!
|
// #87540 Can be last reference!
|
||||||
SbModuleRef xVar = pModule;
|
SbModuleRef xVar = pModule;
|
||||||
pModules.erase(std::remove(pModules.begin(), pModules.end(), xVar));
|
std::erase(pModules, xVar);
|
||||||
pVar->SetParent( nullptr );
|
pVar->SetParent( nullptr );
|
||||||
EndListening( pVar->GetBroadcaster() );
|
EndListening( pVar->GetBroadcaster() );
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ void BridgeFactory::removeBridge(
|
|||||||
osl::MutexGuard g(m_aMutex);
|
osl::MutexGuard g(m_aMutex);
|
||||||
if (n.isEmpty())
|
if (n.isEmpty())
|
||||||
{
|
{
|
||||||
unnamed_.erase(std::remove(unnamed_.begin(), unnamed_.end(), bridge), unnamed_.end());
|
std::erase(unnamed_, bridge);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user