summaryrefslogtreecommitdiff
path: root/svtools/source/dialogs/insdlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source/dialogs/insdlg.cxx')
-rw-r--r--svtools/source/dialogs/insdlg.cxx15
1 files changed, 3 insertions, 12 deletions
diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx
index bb0ea1f07393..01f699d4b835 100644
--- a/svtools/source/dialogs/insdlg.cxx
+++ b/svtools/source/dialogs/insdlg.cxx
@@ -78,18 +78,9 @@ const SvObjectServer * SvObjectServerList::Get( const SvGlobalName & rName ) con
void SvObjectServerList::Remove( const SvGlobalName & rName )
{
- for( size_t i = 0; i < aObjectServerList.size(); )
- {
- if( aObjectServerList[ i ].GetClassName() == rName )
- {
- SvObjectServerList_impl::iterator it = aObjectServerList.begin() + i;
- aObjectServerList.erase( it );
- }
- else
- {
- ++i;
- }
- }
+ aObjectServerList.erase(std::remove_if(aObjectServerList.begin(), aObjectServerList.end(),
+ [rName](const SvObjectServer& rServer) { return rServer.GetClassName() == rName; }),
+ aObjectServerList.end());
}