summaryrefslogtreecommitdiff
path: root/svx/source/form/fmexpl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/form/fmexpl.cxx')
-rw-r--r--svx/source/form/fmexpl.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/svx/source/form/fmexpl.cxx b/svx/source/form/fmexpl.cxx
index 8fec9e0f5798..32f4f8d4d646 100644
--- a/svx/source/form/fmexpl.cxx
+++ b/svx/source/form/fmexpl.cxx
@@ -134,14 +134,12 @@ FmEntryDataList::~FmEntryDataList()
void FmEntryDataList::remove( FmEntryData* pItem )
{
- auto aEnd = maEntryDataList.end();
- for ( auto it = maEntryDataList.begin(); it != aEnd; ++it )
+ auto it = std::find_if(maEntryDataList.begin(), maEntryDataList.end(),
+ [&pItem](const std::unique_ptr<FmEntryData>& rEntryData) { return rEntryData.get() == pItem; });
+ if (it != maEntryDataList.end())
{
- if ( it->get() == pItem )
- {
- maEntryDataList.erase( it );
- return;
- }
+ maEntryDataList.erase( it );
+ return;
}
assert(false);
}