summaryrefslogtreecommitdiff
path: root/svl/source/notify/broadcast.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svl/source/notify/broadcast.cxx')
-rw-r--r--svl/source/notify/broadcast.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/svl/source/notify/broadcast.cxx b/svl/source/notify/broadcast.cxx
index 626a48a332e9..9a63e4b2b67b 100644
--- a/svl/source/notify/broadcast.cxx
+++ b/svl/source/notify/broadcast.cxx
@@ -101,14 +101,14 @@ SvtBroadcaster::~SvtBroadcaster()
// listeners, with the exception of those that already asked to be removed
// during their own destruction
ListenersType::const_iterator dest(maDestructedListeners.begin());
- for (ListenersType::iterator it(maListeners.begin()); it != maListeners.end(); ++it)
+ for (auto& rpListener : maListeners)
{
// skip the destructed ones
- while (dest != maDestructedListeners.end() && (*dest < *it))
+ while (dest != maDestructedListeners.end() && (*dest < rpListener))
++dest;
- if (dest == maDestructedListeners.end() || *dest != *it)
- (*it)->BroadcasterDying(*this);
+ if (dest == maDestructedListeners.end() || *dest != rpListener)
+ rpListener->BroadcasterDying(*this);
}
}
@@ -118,14 +118,14 @@ void SvtBroadcaster::Broadcast( const SfxHint &rHint )
ListenersType::const_iterator dest(maDestructedListeners.begin());
ListenersType aListeners(maListeners); // this copy is important to avoid erasing entries while iterating
- for (ListenersType::iterator it(aListeners.begin()); it != aListeners.end(); ++it)
+ for (auto& rpListener : aListeners)
{
// skip the destructed ones
- while (dest != maDestructedListeners.end() && (*dest < *it))
+ while (dest != maDestructedListeners.end() && (*dest < rpListener))
++dest;
- if (dest == maDestructedListeners.end() || *dest != *it)
- (*it)->Notify(rHint);
+ if (dest == maDestructedListeners.end() || *dest != rpListener)
+ rpListener->Notify(rHint);
}
}