SyntaxHighlighter: Remove useless code branch

Change-Id: I20ea87cf43bae9540707c1e765e40e4baee93357
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2017-05-15 12:10:15 +02:00
parent 8679d8e9a9
commit 4198952214

View File

@@ -125,7 +125,6 @@ void SyntaxHighlighterPrivate::applyFormatChanges(int from, int charsRemoved, in
QTextCharFormat emptyFormat;
QTextLayout::FormatRange r;
r.start = -1;
QVector<QTextLayout::FormatRange> new_ranges;
int i = 0;
@@ -143,18 +142,8 @@ void SyntaxHighlighterPrivate::applyFormatChanges(int from, int charsRemoved, in
while (i < formatChanges.count() && formatChanges.at(i) == r.format)
++i;
if (i >= formatChanges.count())
break;
r.length = i - r.start;
new_ranges << r;
r.start = -1;
}
if (r.start != -1) {
r.length = formatChanges.count() - r.start;
new_ranges << r;
}