diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2018-12-03 00:52:17 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-03 08:14:15 +0100 |
commit | 056845403c387f1fe286f9df13f73fa2fc6d0014 (patch) | |
tree | 34fcb1196b3a1f863bc87915355cb24143cfa9bc /sdext/source/minimizer/optimizationstats.cxx | |
parent | 83a72f46d34fde7a119b00fcc0a7bf58dbe0076a (diff) |
Simplify containers iterations in sdext
Use range-based loop or replace with STL functions
Change-Id: I760c1aaeae9afc99effee6a2645bb77439260ddf
Reviewed-on: https://gerrit.libreoffice.org/64435
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sdext/source/minimizer/optimizationstats.cxx')
-rw-r--r-- | sdext/source/minimizer/optimizationstats.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sdext/source/minimizer/optimizationstats.cxx b/sdext/source/minimizer/optimizationstats.cxx index b3f25bdd9a17..93d86ed9cb1c 100644 --- a/sdext/source/minimizer/optimizationstats.cxx +++ b/sdext/source/minimizer/optimizationstats.cxx @@ -54,11 +54,10 @@ css::beans::PropertyValues OptimizationStats::GetStatusSequence() { int i = 0; uno::Sequence< PropertyValue > aStatsSequence( maStats.size() ); - std::map< PPPOptimizerTokenEnum, uno::Any >::iterator aIter( maStats.begin() ); - while( aIter != maStats.end() ) + for( const auto& rEntry : maStats ) { - aStatsSequence[ i ].Name = TKGet( (*aIter).first ); - aStatsSequence[ i++ ].Value = (*aIter++).second; + aStatsSequence[ i ].Name = TKGet( rEntry.first ); + aStatsSequence[ i++ ].Value = rEntry.second; } return aStatsSequence; } |