forked from qt-creator/qt-creator
SyntaxHighlighter: Remove useless code branch
Change-Id: I20ea87cf43bae9540707c1e765e40e4baee93357 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user