diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2023-11-19 20:51:08 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2023-11-23 09:05:16 +0100 |
commit | 693735e4d39b92d7a16e855cfd9d99d9d150ea75 (patch) | |
tree | 47e76261db7bfc7d86ce696673edd946f7aaefb9 /svl/source | |
parent | 7c4dba1deffd81f647a4a3be7a79f68f3bf9f1ba (diff) |
c++20: use std::erase(_if) instead of std::remove(_if)+erase (svl)
Change-Id: I572a7c81130f15929536c3c334875e8401be9e60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159700
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'svl/source')
-rw-r--r-- | svl/source/filepicker/pickerhistory.cxx | 5 | ||||
-rw-r--r-- | svl/source/notify/broadcast.cxx | 4 | ||||
-rw-r--r-- | svl/source/svdde/ddecli.cxx | 3 |
3 files changed, 3 insertions, 9 deletions
diff --git a/svl/source/filepicker/pickerhistory.cxx b/svl/source/filepicker/pickerhistory.cxx index 525ac66940a8..4f1584760743 100644 --- a/svl/source/filepicker/pickerhistory.cxx +++ b/svl/source/filepicker/pickerhistory.cxx @@ -50,10 +50,7 @@ namespace svt return; // first, check which of the objects we hold in s_aHistory can be removed - _rHistory.erase(std::remove_if(_rHistory.begin(), - _rHistory.end(), - [](const css::uno::WeakReference< XInterface > & x) { return !x.get().is(); }), - _rHistory.end()); + std::erase_if(_rHistory, [](const css::uno::WeakReference< XInterface > & x) { return !x.get().is(); }); // then push_back the picker _rHistory.emplace_back( _rxPicker ); diff --git a/svl/source/notify/broadcast.cxx b/svl/source/notify/broadcast.cxx index c13cfa3b736e..6b323a669329 100644 --- a/svl/source/notify/broadcast.cxx +++ b/svl/source/notify/broadcast.cxx @@ -87,9 +87,7 @@ void SvtBroadcaster::Normalize() const // clear empty slots first, because then we often have to do very little sorting if (mnEmptySlots) { - maListeners.erase( - std::remove_if(maListeners.begin(), maListeners.end(), [] (SvtListener* p) { return isDeletedPtr(p); }), - maListeners.end()); + std::erase_if(maListeners, [] (SvtListener* p) { return isDeletedPtr(p); }); mnEmptySlots = 0; } diff --git a/svl/source/svdde/ddecli.cxx b/svl/source/svdde/ddecli.cxx index 852d7db9e2e5..7ad4c1e097b3 100644 --- a/svl/source/svdde/ddecli.cxx +++ b/svl/source/svdde/ddecli.cxx @@ -256,8 +256,7 @@ DdeTransaction::~DdeTransaction() } delete pName; - rDde.aTransactions.erase(std::remove(rDde.aTransactions.begin(), - rDde.aTransactions.end(),this)); + std::erase(rDde.aTransactions,this); } void DdeTransaction::Execute() |