diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2023-11-19 20:57:35 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2023-11-20 07:39:42 +0100 |
commit | 15ef2909b88ef97b84615837e8bdb448481d61c1 (patch) | |
tree | 728ec60104cb96e16c5ffaa600380ca58c8fc639 /svx/source/svdraw | |
parent | 31795be8ee5bcc113f2d18d315f842a89e95b316 (diff) |
c++20: use std::erase(_if) instead of std::remove(_if)+erase (svx)
Change-Id: If0cca803cd182f5def098ab06a0c5a4a479758bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159702
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r-- | svx/source/svdraw/svdhdl.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdmark.cxx | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index 90903acb29f8..867afa6a90b8 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -2239,9 +2239,7 @@ std::unique_ptr<SdrHdl> SdrHdlList::RemoveHdl(size_t nNum) void SdrHdlList::RemoveAllByKind(SdrHdlKind eKind) { - maList.erase(std::remove_if(maList.begin(), maList.end(), - [&eKind](std::unique_ptr<SdrHdl>& rItem) { return rItem->GetKind() == eKind; }), - maList.end()); + std::erase_if(maList, [&eKind](std::unique_ptr<SdrHdl>& rItem) { return rItem->GetKind() == eKind; }); } void SdrHdlList::Clear() diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx index c811a4d20aa5..521e56d44b9d 100644 --- a/svx/source/svdraw/svdmark.cxx +++ b/svx/source/svdraw/svdmark.cxx @@ -158,9 +158,7 @@ void SdrMarkList::ImpForceSort() // remove invalid if(nCount > 0 ) { - maList.erase(std::remove_if(maList.begin(), maList.end(), - [](std::unique_ptr<SdrMark>& rItem) { return rItem->GetMarkedSdrObj() == nullptr; }), - maList.end()); + std::erase_if(maList, [](std::unique_ptr<SdrMark>& rItem) { return rItem->GetMarkedSdrObj() == nullptr; }); nCount = maList.size(); } |