summaryrefslogtreecommitdiff
path: root/svtools/source/edit
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2018-02-08 11:09:15 +0100
committerJulien Nabet <serval2412@yahoo.fr>2018-02-08 18:31:34 +0100
commit0fb4ae8767fa5ff791cd42934b4215011a269eb0 (patch)
tree90c10a3b8f566d4f008675f2dbf5b7b07af8158e /svtools/source/edit
parent275c1e0a05c1d31c9d83a246082a59db3119059d (diff)
Modernize a bit svtools
by using for-range loops + use empty() instead of comparing begin and end iterator Change-Id: I41c3ae0c9032d6349afb113d457cb78862ae9dcf Reviewed-on: https://gerrit.libreoffice.org/49416 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'svtools/source/edit')
-rw-r--r--svtools/source/edit/editsyntaxhighlighter.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/svtools/source/edit/editsyntaxhighlighter.cxx b/svtools/source/edit/editsyntaxhighlighter.cxx
index bb4ad8838b3e..004cecdd18f5 100644
--- a/svtools/source/edit/editsyntaxhighlighter.cxx
+++ b/svtools/source/edit/editsyntaxhighlighter.cxx
@@ -167,10 +167,9 @@ void MultiLineEditSyntaxHighlight::UpdateData()
GetTextEngine()->RemoveAttribs( nLine );
std::vector<HighlightPortion> aPortions;
aHighlighter.getHighlightPortions( aLine, aPortions );
- for (std::vector<HighlightPortion>::iterator i(aPortions.begin());
- i != aPortions.end(); ++i)
+ for (auto const& portion : aPortions)
{
- GetTextEngine()->SetAttrib( TextAttribFontColor( GetColorValue(i->tokenType) ), nLine, i->nBegin, i->nEnd );
+ GetTextEngine()->SetAttrib( TextAttribFontColor( GetColorValue(portion.tokenType) ), nLine, portion.nBegin, portion.nEnd );
}
}
GetTextView()->ShowCursor( false );