summaryrefslogtreecommitdiff
path: root/svl/source
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2023-11-19 20:51:08 +0100
committerJulien Nabet <serval2412@yahoo.fr>2023-11-23 09:05:16 +0100
commit693735e4d39b92d7a16e855cfd9d99d9d150ea75 (patch)
tree47e76261db7bfc7d86ce696673edd946f7aaefb9 /svl/source
parent7c4dba1deffd81f647a4a3be7a79f68f3bf9f1ba (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.cxx5
-rw-r--r--svl/source/notify/broadcast.cxx4
-rw-r--r--svl/source/svdde/ddecli.cxx3
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()