diff options
author | Andrzej Hunt <andrzej@ahunt.org> | 2015-11-21 08:14:05 -0800 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-01-05 11:06:52 +0000 |
commit | 9d0b06e9f728d01a2d2908e1e56cb4220cd414d5 (patch) | |
tree | 072f69061281445cf3591f55592b87402dcd14d9 /sd/source | |
parent | d202f851717bb5a8fe5fed98f747a1fd164d3225 (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/filter/eppt/pptx-epptooxml.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/animations/SlideTransitionPane.cxx | 10 |
2 files changed, 6 insertions, 6 deletions
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() ); |