From 0787ce8814e37972a0c968f60008d4e8722b6e27 Mon Sep 17 00:00:00 2001 From: Arkadiy Illarionov Date: Wed, 15 Aug 2018 21:32:27 +0300 Subject: Simplify containers iterations, tdf#96099 follow-up Use range-based loop or replace with std::any_of, std::find and std::find_if where applicable. Change-Id: I2f80788c49d56094c29b102eb96a7a7c079567c6 Reviewed-on: https://gerrit.libreoffice.org/59143 Tested-by: Jenkins Reviewed-by: Michael Meeks Reviewed-by: Noel Grandin --- sd/source/ui/sidebar/MasterPageObserver.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sd/source/ui/sidebar') diff --git a/sd/source/ui/sidebar/MasterPageObserver.cxx b/sd/source/ui/sidebar/MasterPageObserver.cxx index 341c02cb090d..501d0f55ceac 100644 --- a/sd/source/ui/sidebar/MasterPageObserver.cxx +++ b/sd/source/ui/sidebar/MasterPageObserver.cxx @@ -279,11 +279,11 @@ void MasterPageObserver::Implementation::AnalyzeUsedMasterPages ( aOldMasterPagesDescriptor->second.begin(), aOldMasterPagesDescriptor->second.end(), std::back_inserter(aNewMasterPages)); - for (auto I=aNewMasterPages.begin(); I!=aNewMasterPages.end(); ++I) + for (auto& aNewMasterPage : aNewMasterPages) { MasterPageObserverEvent aEvent ( MasterPageObserverEvent::ET_MASTER_PAGE_ADDED, - *I); + aNewMasterPage); SendEvent (aEvent); } @@ -294,11 +294,11 @@ void MasterPageObserver::Implementation::AnalyzeUsedMasterPages ( aCurrentMasterPages.begin(), aCurrentMasterPages.end(), std::back_inserter(aRemovedMasterPages)); - for (auto I=aRemovedMasterPages.begin(); I!=aRemovedMasterPages.end(); ++I) + for (auto& aRemovedMasterPage : aRemovedMasterPages) { MasterPageObserverEvent aEvent ( MasterPageObserverEvent::ET_MASTER_PAGE_REMOVED, - *I); + aRemovedMasterPage); SendEvent (aEvent); } -- cgit