summaryrefslogtreecommitdiff
path: root/svl/source/notify/broadcast.cxx
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2016-03-29 21:36:59 +0200
committerJulien Nabet <serval2412@yahoo.fr>2016-03-30 05:06:21 +0000
commita0527676b17838c310701f169ce23d0386b82eb6 (patch)
tree55f06881249f196372d399dc49c0e47d0552ed3d /svl/source/notify/broadcast.cxx
parent1d060568ce8e7b8aa04c418e282962131801bea4 (diff)
Use const_iterator when possible (svl except svdde)
Change-Id: Ie19467a020d1839146d5a6324e54ccf223d99dd6 Reviewed-on: https://gerrit.libreoffice.org/23603 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'svl/source/notify/broadcast.cxx')
-rw-r--r--svl/source/notify/broadcast.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/svl/source/notify/broadcast.cxx b/svl/source/notify/broadcast.cxx
index b7415ad39006..2a9338ca787e 100644
--- a/svl/source/notify/broadcast.cxx
+++ b/svl/source/notify/broadcast.cxx
@@ -79,7 +79,7 @@ SvtBroadcaster::SvtBroadcaster( const SvtBroadcaster &rBC ) :
if (mbAboutToDie)
Normalize();
- ListenersType::iterator dest(maDestructedListeners.begin());
+ ListenersType::const_iterator dest(maDestructedListeners.begin());
for (ListenersType::iterator it(maListeners.begin()); it != maListeners.end(); ++it)
{
bool bStart = true;
@@ -108,7 +108,7 @@ SvtBroadcaster::~SvtBroadcaster()
// now when both lists are sorted, we can linearly unregister all
// listeners, with the exception of those that already asked to be removed
// during their own destruction
- ListenersType::iterator dest(maDestructedListeners.begin());
+ ListenersType::const_iterator dest(maDestructedListeners.begin());
for (ListenersType::iterator it(maListeners.begin()); it != maListeners.end(); ++it)
{
// skip the destructed ones
@@ -124,7 +124,7 @@ void SvtBroadcaster::Broadcast( const SfxHint &rHint )
{
Normalize();
- ListenersType::iterator dest(maDestructedListeners.begin());
+ 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)
{