c++20: use std::erase instead of std::removed followed by erase (part 2)
Change-Id: I0222f0f53f387dd57bd674b1e137b53487f4e1d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159611 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
This commit is contained in:
parent
e08efe99cd
commit
d0b0908e62
4 changed files with 4 additions and 8 deletions
|
@ -76,10 +76,7 @@ namespace canvas
|
|||
// be relocated to some other page or it will
|
||||
// currently be deleted. in either case, simply
|
||||
// remove the reference from our internal storage.
|
||||
FragmentContainer_t::iterator it(
|
||||
std::remove(
|
||||
mpFragments.begin(),mpFragments.end(),pFragment));
|
||||
mpFragments.erase(it,mpFragments.end());
|
||||
std::erase(mpFragments, pFragment);
|
||||
}
|
||||
|
||||
bool Page::insert( SurfaceRect& r )
|
||||
|
|
|
@ -455,7 +455,7 @@ namespace canvas
|
|||
|
||||
void SpriteRedrawManager::hideSprite( const Sprite::Reference& rSprite )
|
||||
{
|
||||
maSprites.erase(std::remove(maSprites.begin(), maSprites.end(), rSprite), maSprites.end());
|
||||
std::erase(maSprites, rSprite);
|
||||
}
|
||||
|
||||
void SpriteRedrawManager::moveSprite( const Sprite::Reference& rSprite,
|
||||
|
|
|
@ -62,7 +62,7 @@ namespace cppu_threadpool
|
|||
void DisposedCallerAdmin::destroy( void const * nDisposeId )
|
||||
{
|
||||
std::scoped_lock guard( m_mutex );
|
||||
m_vector.erase(std::remove(m_vector.begin(), m_vector.end(), nDisposeId), m_vector.end());
|
||||
std::erase(m_vector, nDisposeId);
|
||||
}
|
||||
|
||||
bool DisposedCallerAdmin::isDisposed( void const * nDisposeId )
|
||||
|
|
|
@ -293,8 +293,7 @@ extern "C" void SAL_CALL typelib_typedescription_revokeCallback(
|
|||
// todo mt safe: guard is no solution, can not acquire while calling callback!
|
||||
// OslGuard aGuard( rInit.getMutex() );
|
||||
CallbackEntry aEntry( pContext, pCallback );
|
||||
rInit.maCallbacks.erase(std::remove(rInit.maCallbacks.begin(), rInit.maCallbacks.end(), aEntry),
|
||||
rInit.maCallbacks.end());
|
||||
std::erase(rInit.maCallbacks, aEntry);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue