summaryrefslogtreecommitdiff
path: root/extensions/source/propctrlr/propcontroller.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/source/propctrlr/propcontroller.cxx')
-rw-r--r--extensions/source/propctrlr/propcontroller.cxx21
1 files changed, 6 insertions, 15 deletions
diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx
index 062df51c042c..9f6fa9fcbaed 100644
--- a/extensions/source/propctrlr/propcontroller.cxx
+++ b/extensions/source/propctrlr/propcontroller.cxx
@@ -596,17 +596,10 @@ namespace pcr
m_pView = nullptr;
}
- for ( InterfaceArray::iterator loop = m_aInspectedObjects.begin();
- loop != m_aInspectedObjects.end();
- ++loop
- )
- {
- if ( *loop == _rSource.Source )
- {
- m_aInspectedObjects.erase( loop );
- break;
- }
- }
+ auto it = std::find_if(m_aInspectedObjects.begin(), m_aInspectedObjects.end(),
+ [&_rSource](const InterfaceArray::value_type& rxObj) { return rxObj == _rSource.Source; });
+ if (it != m_aInspectedObjects.end())
+ m_aInspectedObjects.erase(it);
}
@@ -1462,10 +1455,8 @@ namespace pcr
bool OPropertyBrowserController::impl_findObjectProperty_nothrow( const OUString& _rName, OrderedPropertyMap::const_iterator* _pProperty )
{
- OrderedPropertyMap::const_iterator search = m_aProperties.begin();
- for ( ; search != m_aProperties.end(); ++search )
- if ( search->second.Name == _rName )
- break;
+ OrderedPropertyMap::const_iterator search = std::find_if(m_aProperties.begin(), m_aProperties.end(),
+ [&_rName](const OrderedPropertyMap::value_type& rEntry) { return rEntry.second.Name == _rName; });
if ( _pProperty )
*_pProperty = search;
return ( search != m_aProperties.end() );