svtools/source/config/miscopt.cxx |    2 +-
 svtools/source/dialogs/insdlg.cxx |    4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 31795be8ee5bcc113f2d18d315f842a89e95b316
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Sun Nov 19 20:52:41 2023 +0100
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Mon Nov 20 07:38:52 2023 +0100

    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 <serval2...@yahoo.fr>

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; });
 }
 
 

Reply via email to