diff options
author | Eike Ziller <eike.ziller@qt.io> | 2017-05-15 12:10:15 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2017-05-17 14:37:43 +0000 |
commit | 4198952214ebb66eb57634593e92d821aea06554 (patch) | |
tree | 07b645fcf786c4bf90e87b72bf6d8eabe2d88f01 /src/plugins/texteditor/syntaxhighlighter.cpp | |
parent | 8679d8e9a9581362244b0aa3d762adf83855f5b8 (diff) |
SyntaxHighlighter: Remove useless code branch
Change-Id: I20ea87cf43bae9540707c1e765e40e4baee93357
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/texteditor/syntaxhighlighter.cpp')
-rw-r--r-- | src/plugins/texteditor/syntaxhighlighter.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/plugins/texteditor/syntaxhighlighter.cpp b/src/plugins/texteditor/syntaxhighlighter.cpp index e038ecf4f8..952dc25611 100644 --- a/src/plugins/texteditor/syntaxhighlighter.cpp +++ b/src/plugins/texteditor/syntaxhighlighter.cpp @@ -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,19 +142,9 @@ 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; } formatsChanged = formatsChanged || (new_ranges.size() != old_ranges.size()); |