diff options
author | Noel Grandin <noel@peralex.com> | 2015-06-15 16:36:36 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-06-19 09:55:07 +0200 |
commit | e0f3e7c007e9eeced888b491ec2698acba4bc588 (patch) | |
tree | bb53c606375f22d63df0ca860e726d27e83fb1c3 /svl | |
parent | 0c5d286cbe299be356797447cb2b6747c68a015e (diff) |
tdf#42374 some small optimisations for opening this PDF file
makes it about 10% faster
Change-Id: I145faed5aa7c312372f08cc651df5afcf10c70ab
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/notify/lstner.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/svl/source/notify/lstner.cxx b/svl/source/notify/lstner.cxx index b7b338767a5e..ee0809cd0db7 100644 --- a/svl/source/notify/lstner.cxx +++ b/svl/source/notify/lstner.cxx @@ -90,15 +90,16 @@ void SfxListener::StartListening( SfxBroadcaster& rBroadcaster, bool bPreventDup void SfxListener::EndListening( SfxBroadcaster& rBroadcaster, bool bAllDups ) { + SfxBroadcasterArr_Impl::iterator beginIt = mpImpl->maBCs.begin(); do { - SfxBroadcasterArr_Impl::iterator it = std::find( mpImpl->maBCs.begin(), mpImpl->maBCs.end(), &rBroadcaster ); + SfxBroadcasterArr_Impl::iterator it = std::find( beginIt, mpImpl->maBCs.end(), &rBroadcaster ); if ( it == mpImpl->maBCs.end() ) { break; } rBroadcaster.RemoveListener(*this); - mpImpl->maBCs.erase( it ); + beginIt = mpImpl->maBCs.erase( it ); } while ( bAllDups ); } |