[Libreoffice-commits] core.git: framework/source
Julien Nabet
serval2412 at yahoo.fr
Mon Aug 26 21:11:33 PDT 2013
framework/source/fwe/helper/propertysetcontainer.cxx | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
New commits:
commit c6040d9bd4c631ebdaab9383d9ab4de0c26657ce
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Tue Aug 27 06:09:45 2013 +0200
Bin intermediate iterator + rename parameter function
(see example of http://www.cplusplus.com/reference/vector/vector/erase/)
Change-Id: I8c0ee334abd91ea99b80a43581a04cbbf9a91fa3
diff --git a/framework/source/fwe/helper/propertysetcontainer.cxx b/framework/source/fwe/helper/propertysetcontainer.cxx
index a93c14f..52df1de 100644
--- a/framework/source/fwe/helper/propertysetcontainer.cxx
+++ b/framework/source/fwe/helper/propertysetcontainer.cxx
@@ -109,16 +109,14 @@ void SAL_CALL PropertySetContainer::insertByIndex( sal_Int32 Index, const ::com:
throw IndexOutOfBoundsException( OUString(), (OWeakObject *)this );
}
-void SAL_CALL PropertySetContainer::removeByIndex( sal_Int32 Index )
+void SAL_CALL PropertySetContainer::removeByIndex( sal_Int32 nIndex )
throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException )
{
ResetableGuard aGuard( m_aLock );
- if ( (sal_Int32)m_aPropertySetVector.size() > Index )
+ if ( (sal_Int32)m_aPropertySetVector.size() > nIndex )
{
- PropertySetVector::iterator aIter = m_aPropertySetVector.begin();
- aIter += Index;
- m_aPropertySetVector.erase( aIter );
+ m_aPropertySetVector.erase(m_aPropertySetVector.begin() + nIndex);
}
else
throw IndexOutOfBoundsException( OUString(), (OWeakObject *)this );
More information about the Libreoffice-commits
mailing list