summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2013-03-30 16:33:05 +0100
committerLuboš Luňák <l.lunak@suse.cz>2013-04-04 12:45:52 +0000
commit92824e8e25fc0cf66f461303da81f122eaf0f01b (patch)
tree83f6cd16129515a0b52c9af858019179012478ec /package
parent974e18faea7b220677c86ee3c6ba41534ef33c5a (diff)
Simplify a bit
Change-Id: I77cb2b08b1d92f3c8ad406bb1ebd2d080cdbfa1a Reviewed-on: https://gerrit.libreoffice.org/3123 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
Diffstat (limited to 'package')
-rw-r--r--package/source/xstor/ohierarchyholder.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/package/source/xstor/ohierarchyholder.cxx b/package/source/xstor/ohierarchyholder.cxx
index 39f177e8bed0..a5fa77653c73 100644
--- a/package/source/xstor/ohierarchyholder.cxx
+++ b/package/source/xstor/ohierarchyholder.cxx
@@ -301,14 +301,14 @@ void OHierarchyElement_Impl::RemoveElement( const ::rtl::Reference< OHierarchyEl
{
{
::osl::MutexGuard aGuard( m_aMutex );
- for ( OHierarchyElementList_Impl::iterator aIter = m_aChildren.begin();
- aIter != m_aChildren.end(); /* increment is done in body */)
+ OHierarchyElementList_Impl::iterator aIter = m_aChildren.begin();
+ const OHierarchyElementList_Impl::const_iterator aEnd = m_aChildren.end();
+ while (aIter != aEnd)
{
- OHierarchyElementList_Impl::iterator aTmpIter = aIter;
- ++aIter;
-
- if ( aTmpIter->second == aRef )
- m_aChildren.erase( aTmpIter );
+ if (aIter->second == aRef )
+ aIter = m_aChildren.erase(aIter);
+ else
+ ++aIter;
}
}