diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2023-11-18 13:15:01 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2023-11-18 18:38:36 +0100 |
commit | 4bbd9853afde9456c1c5bc16eca3b775e53a01fe (patch) | |
tree | a93906af4375f21d212096368342ba323c930e4a /framework/source | |
parent | 6e587b15efb824c97e103d86d360c590918263c4 (diff) |
c++20: use std::erase(_if) instead of std::remove(_if)+erase (part 4)
Change-Id: I6af5501e3fde07024dcc74f00c8fd69bd369d8d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159613
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'framework/source')
-rw-r--r-- | framework/source/services/desktop.cxx | 4 | ||||
-rw-r--r-- | framework/source/services/pathsettings.cxx | 5 |
2 files changed, 3 insertions, 6 deletions
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index 35dfcd2e21eb..237d35afc6a5 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -443,9 +443,7 @@ void SAL_CALL Desktop::removeTerminateListener( const css::uno::Reference< css:: } else if (sImplementationName == "com.sun.star.comp.ComponentDLLListener") { - m_xComponentDllListeners.erase( - std::remove(m_xComponentDllListeners.begin(), m_xComponentDllListeners.end(), xListener), - m_xComponentDllListeners.end()); + std::erase(m_xComponentDllListeners, xListener); return; } } diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx index 0a24b96adda7..36237e824edc 100644 --- a/framework/source/services/pathsettings.cxx +++ b/framework/source/services/pathsettings.cxx @@ -997,11 +997,10 @@ void PathSettings::impl_purgeKnownPaths(PathSettings::PathInfo& rPath, } // Erase items not in lList from the user path list. - rPath.lUserPaths.erase(std::remove_if(rPath.lUserPaths.begin(), rPath.lUserPaths.end(), + std::erase_if(rPath.lUserPaths, [&lList](const OUString& rItem) { return std::find(lList.begin(), lList.end(), rItem) == lList.end(); - }), - rPath.lUserPaths.end()); + }); // Erase items in the user path list from lList. for (auto const& userPath : rPath.lUserPaths) |