summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2013-03-30 17:16:18 +0100
committerJulien Nabet <serval2412@yahoo.fr>2013-03-30 17:16:18 +0100
commita1b24ca0ef565eb3b3f8d152754a7ebc00112cec (patch)
treef350b4136cca4a3372a891ee46dbf9515a1ddaac /svtools
parent35661319cdb11e2bcb619cde73310f47b318dc00 (diff)
Optimize a bit iterators stuff
Change-Id: I93de737265651a47a2ed0a56bca27bd19a5c5770
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/misc/transfer.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index fbc688afdd53..b92a3ed61195 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;
}