From a1b24ca0ef565eb3b3f8d152754a7ebc00112cec Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sat, 30 Mar 2013 17:16:18 +0100 Subject: Optimize a bit iterators stuff Change-Id: I93de737265651a47a2ed0a56bca27bd19a5c5770 --- svtools/source/misc/transfer.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'svtools') 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; } -- cgit