[Libreoffice-commits] core.git: svtools/source
Julien Nabet
serval2412 at yahoo.fr
Sat Mar 30 09:18:37 PDT 2013
svtools/source/misc/transfer.cxx | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
New commits:
commit a1b24ca0ef565eb3b3f8d152754a7ebc00112cec
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Mar 30 17:16:18 2013 +0100
Optimize a bit iterators stuff
Change-Id: I93de737265651a47a2ed0a56bca27bd19a5c5770
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index fbc688a..b92a3ed 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -695,15 +695,13 @@ void TransferableHelper::RemoveFormat( SotFormatStringId nFormat )
void TransferableHelper::RemoveFormat( const DataFlavor& rFlavor )
{
- DataFlavorExVector::iterator aIter( mpFormats->begin() ), aEnd( mpFormats->end() );
+ DataFlavorExVector::iterator aIter( mpFormats->begin() );
+ const DataFlavorExVector::const_iterator aEnd( mpFormats->end() );
- while( aIter != aEnd )
+ while (aIter != aEnd)
{
if( TransferableDataHelper::IsEqual( *aIter, rFlavor ) )
- {
aIter = mpFormats->erase( aIter );
- aEnd = mpFormats->end();
- }
else
++aIter;
}
More information about the Libreoffice-commits
mailing list