summaryrefslogtreecommitdiff
path: root/chart2/source/model/main/Axis.cxx
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2018-03-03 12:54:07 +0100
committerJulien Nabet <serval2412@yahoo.fr>2018-03-03 19:20:53 +0100
commitba7191ed0d4da2f5a2ebd2ef40387b26145860f1 (patch)
treee019dbd2dcc947c155e63841c2ec3a53eca427fb /chart2/source/model/main/Axis.cxx
parent301514183d471cfeb085673eb4563f8c310162b7 (diff)
Use for-range loops in chart2 (part1)
Change-Id: I9310a6dc79d47f9058df8a3b463667389af1b2cb Reviewed-on: https://gerrit.libreoffice.org/50672 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'chart2/source/model/main/Axis.cxx')
-rw-r--r--chart2/source/model/main/Axis.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx
index 639c347582da..49340ee8d9b8 100644
--- a/chart2/source/model/main/Axis.cxx
+++ b/chart2/source/model/main/Axis.cxx
@@ -426,11 +426,10 @@ void Axis::AllocateSubGrids()
}
}
//don't keep the mutex locked while calling out
- std::vector< Reference< beans::XPropertySet > >::iterator aBroadcaster = aOldBroadcasters.begin();
- for( ;aBroadcaster != aOldBroadcasters.end(); ++aBroadcaster )
- ModifyListenerHelper::removeListener( *aBroadcaster, xModifyEventForwarder );
- for( aBroadcaster = aNewBroadcasters.begin(); aBroadcaster != aNewBroadcasters.end(); ++aBroadcaster )
- ModifyListenerHelper::addListener( *aBroadcaster, xModifyEventForwarder );
+ for (auto const& oldBroadcaster : aOldBroadcasters)
+ ModifyListenerHelper::removeListener(oldBroadcaster, xModifyEventForwarder );
+ for (auto const& newBroadcaster : aNewBroadcasters)
+ ModifyListenerHelper::addListener( newBroadcaster, xModifyEventForwarder );
}
// ____ XAxis ____