diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2023-11-19 20:52:41 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2023-11-20 07:38:52 +0100 |
commit | 31795be8ee5bcc113f2d18d315f842a89e95b316 (patch) | |
tree | ee041f2a802a56d97d38169a7faf5f103b23a2cf /svtools | |
parent | 2718e9c1d5779a23bd6587a7e0e55a0281b88745 (diff) |
c++20: use std::erase(_if) instead of std::remove(_if)+erase (svtools)
Change-Id: I53a244ac751dbe9d40e8f541fcb6d7ff89ff83f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159701
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/config/miscopt.cxx | 2 | ||||
-rw-r--r-- | svtools/source/dialogs/insdlg.cxx | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx index 625086eee24c..ca8537b1c38c 100644 --- a/svtools/source/config/miscopt.cxx +++ b/svtools/source/config/miscopt.cxx @@ -228,7 +228,7 @@ void SvtMiscOptions_Impl::AddListenerLink( const Link<LinkParamNone*,void>& rLin void SvtMiscOptions_Impl::RemoveListenerLink( const Link<LinkParamNone*,void>& rLink ) { - aList.erase(std::remove(aList.begin(), aList.end(), rLink), aList.end()); + std::erase(aList, rLink); } void SvtMiscOptions_Impl::CallListeners() diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx index 7fe1728f4194..50fad4a75dcd 100644 --- a/svtools/source/dialogs/insdlg.cxx +++ b/svtools/source/dialogs/insdlg.cxx @@ -97,9 +97,7 @@ const SvObjectServer * SvObjectServerList::Get( const SvGlobalName & rName ) con void SvObjectServerList::Remove( const SvGlobalName & rName ) { - aObjectServerList.erase(std::remove_if(aObjectServerList.begin(), aObjectServerList.end(), - [rName](const SvObjectServer& rServer) { return rServer.GetClassName() == rName; }), - aObjectServerList.end()); + std::erase_if(aObjectServerList, [rName](const SvObjectServer& rServer) { return rServer.GetClassName() == rName; }); } |