[Libreoffice-commits] core.git: package/source
Julien Nabet
serval2412 at yahoo.fr
Thu Apr 4 05:46:11 PDT 2013
package/source/xstor/ohierarchyholder.cxx | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
New commits:
commit 92824e8e25fc0cf66f461303da81f122eaf0f01b
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Mar 30 16:33:05 2013 +0100
Simplify a bit
Change-Id: I77cb2b08b1d92f3c8ad406bb1ebd2d080cdbfa1a
Reviewed-on: https://gerrit.libreoffice.org/3123
Reviewed-by: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Tested-by: LuboÅ¡ LuÅák <l.lunak at suse.cz>
diff --git a/package/source/xstor/ohierarchyholder.cxx b/package/source/xstor/ohierarchyholder.cxx
index 39f177e..a5fa776 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;
}
}
More information about the Libreoffice-commits
mailing list