From 9d0b06e9f728d01a2d2908e1e56cb4220cd414d5 Mon Sep 17 00:00:00 2001 From: Andrzej Hunt Date: Sat, 21 Nov 2015 08:14:05 -0800 Subject: new loplugin rangedforcopy - use reference in range based for Inspired by 6e6ae9803796b120e95f6e89575e03c5fd0ed3c2 Change-Id: Ia0f264d3a6bbf076aa5080e3398683e50bc6ef01 Reviewed-on: https://gerrit.libreoffice.org/20190 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- sd/source/filter/eppt/pptx-epptooxml.cxx | 2 +- sd/source/ui/animations/SlideTransitionPane.cxx | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'sd') diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 0e5cdf3296c1..1e483ab58fc7 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -1419,7 +1419,7 @@ void PowerPointExport::WriteAuthors() FSNS( XML_xmlns, XML_p ), "http://schemas.openxmlformats.org/presentationml/2006/main", FSEND ); - for( AuthorsMap::value_type i : maAuthors ) { + for( const AuthorsMap::value_type& i : maAuthors ) { pFS->singleElementNS( XML_p, XML_cmAuthor, XML_id, I32S( i.second.nId ), XML_name, USS( i.first ), diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx index 2cb163cfb358..1f3cb27c719b 100644 --- a/sd/source/ui/animations/SlideTransitionPane.cxx +++ b/sd/source/ui/animations/SlideTransitionPane.cxx @@ -361,7 +361,7 @@ size_t getPresetOffset( const sd::impl::TransitionEffect &rEffect ) sd::TransitionPresetPtr pFound; size_t nIdx = 0; - for( auto aIt: rPresetList ) + for( const auto& aIt: rPresetList ) { if( rEffect.operator==( *aIt )) break; @@ -782,7 +782,7 @@ impl::TransitionEffect SlideTransitionPane::getTransitionEffectFromControls() co { int nVariant = 0; bool bFound = false; - for( auto aIter: rPresetList ) + for( const auto& aIter: rPresetList ) { if( aIter->getSetId() == (*aSelected)->getSetId() ) { @@ -1039,7 +1039,7 @@ void SlideTransitionPane::updateVariants( size_t nPresetOffset ) // Fill in the variant listbox size_t nFirstItem = 0, nItem = 1; - for( auto aIt: rPresetList ) + for( const auto& aIt: rPresetList ) { if( aIt->getSetId().equals( (*pFound)->getSetId() ) ) { @@ -1117,7 +1117,7 @@ IMPL_LINK_NOARG_TYPED(SlideTransitionPane, LateInitCallback, Timer *, void) const TransitionPresetList& rPresetList = TransitionPreset::getTransitionPresetList(); size_t nPresetOffset = 0; - for( auto aIter: rPresetList ) + for( const auto& aIter: rPresetList ) { TransitionPresetPtr pPreset = aIter; const OUString sLabel( pPreset->getSetLabel() ); @@ -1151,7 +1151,7 @@ IMPL_LINK_NOARG_TYPED(SlideTransitionPane, LateInitCallback, Timer *, void) nPresetOffset = 0; SAL_INFO( "sd.transitions", "Transition presets by offsets:"); - for( auto aIter: rPresetList ) + for( const auto& aIter: rPresetList ) { SAL_INFO( "sd.transitions", nPresetOffset++ << " " << aIter->getPresetId() << ": " << aIter->getSetId() ); -- cgit