diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2018-02-26 21:45:06 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2018-02-27 09:12:59 +0100 |
commit | 573f87f6ea57a248c79f52b1cd4e5f1978112567 (patch) | |
tree | d5425462ab8c9a4a0c2f18e8bf79fe6bef1380ac /comphelper/qa | |
parent | 59363e639b67a8acbd6da240635de47921b2c955 (diff) |
Use for-range loops in comphelper and configmgr
Change-Id: I91033395cb30a4ba9e65adb89712b3c70a39a508
Reviewed-on: https://gerrit.libreoffice.org/50396
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'comphelper/qa')
-rw-r--r-- | comphelper/qa/unit/syntaxhighlighttest.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/comphelper/qa/unit/syntaxhighlighttest.cxx b/comphelper/qa/unit/syntaxhighlighttest.cxx index 6a35049fcd08..c502262669a0 100644 --- a/comphelper/qa/unit/syntaxhighlighttest.cxx +++ b/comphelper/qa/unit/syntaxhighlighttest.cxx @@ -107,12 +107,11 @@ void SyntaxHighlightTest::testBasic() aBasicString, aPortions ); sal_Int32 prevEnd = 0; - for(std::vector<HighlightPortion>::const_iterator itr = - aPortions.begin(), itrEnd = aPortions.end(); itr != itrEnd; ++itr) + for (auto const& portion : aPortions) { - CPPUNIT_ASSERT_EQUAL(prevEnd, itr->nBegin); - CPPUNIT_ASSERT(itr->nBegin < itr->nEnd); - prevEnd = itr->nEnd; + CPPUNIT_ASSERT_EQUAL(prevEnd, portion.nBegin); + CPPUNIT_ASSERT(portion.nBegin < portion.nEnd); + prevEnd = portion.nEnd; } CPPUNIT_ASSERT_EQUAL(aBasicString.getLength(), prevEnd); } |