diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2018-12-19 21:53:06 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-20 08:15:54 +0100 |
commit | b38e690296e48657ec8c66427a6511f42f4b0115 (patch) | |
tree | 3ddf7f7df1bdba73552efa4a97cef92dff0bb4da /scaddins | |
parent | 45f0c58c615e1caf2bc8630924e2e4c89ac7bc4d (diff) |
Simplify containers iterations in scaddins, sccomp, scripting
Use range-based loop or replace with STL functions
Change-Id: I21ec2eea8f322e2792097d352fc352dc6099c7b7
Reviewed-on: https://gerrit.libreoffice.org/65461
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'scaddins')
-rw-r--r-- | scaddins/source/analysis/analysishelper.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx index 1a21ecbb0b31..787c99bd3dd8 100644 --- a/scaddins/source/analysis/analysishelper.cxx +++ b/scaddins/source/analysis/analysishelper.cxx @@ -2457,10 +2457,9 @@ double ConvertDataList::Convert( double fVal, const OUString& rFrom, const OUStr sal_Int16 nLevelFrom = 0; sal_Int16 nLevelTo = 0; - auto it = maVector.begin(); - while( it != maVector.end() && ( bSearchFrom || bSearchTo ) ) + for( const auto& rItem : maVector ) { - ConvertData* p = it->get(); + ConvertData* p = rItem.get(); if( bSearchFrom ) { sal_Int16 n = p->GetMatchingLevel( rFrom ); @@ -2499,7 +2498,8 @@ double ConvertDataList::Convert( double fVal, const OUString& rFrom, const OUStr } } - ++it; + if( !bSearchFrom && !bSearchTo ) + break; } if( !pFrom || !pTo ) |