summaryrefslogtreecommitdiffstats
path: root/src/scripttools/debugging/qscriptsyntaxhighlighter.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2012-09-28 16:16:36 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-09-29 08:12:32 +0200
commitd65dbb5d508d4cdbc383686428430035c205b21c (patch)
tree35457ae8b8cb93fdae295ac28c78d221091b98d9 /src/scripttools/debugging/qscriptsyntaxhighlighter.cpp
parent66e7e69f00a08664f0c0a6ed62a37a6918eaf8f3 (diff)
Fix g++/MinGW compiler warnings.
- Assigned/Unused variables. - Unsigned comparison >= 0 is always true. - Constructor initialization order. - Signed/Unsigned comparisons. Change-Id: I1f9edab0506573420ed0bf3055252ba48625c8eb Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'src/scripttools/debugging/qscriptsyntaxhighlighter.cpp')
-rw-r--r--src/scripttools/debugging/qscriptsyntaxhighlighter.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/scripttools/debugging/qscriptsyntaxhighlighter.cpp b/src/scripttools/debugging/qscriptsyntaxhighlighter.cpp
index 46b190d25a..1e25b68ab5 100644
--- a/src/scripttools/debugging/qscriptsyntaxhighlighter.cpp
+++ b/src/scripttools/debugging/qscriptsyntaxhighlighter.cpp
@@ -235,7 +235,6 @@ void QScriptSyntaxHighlighter::highlightBlock(const QString &text)
QChar lastChar;
int firstNonSpace = -1;
- int lastNonSpace = -1;
for (;;) {
const QChar c = text.at(i);
@@ -337,11 +336,8 @@ void QScriptSyntaxHighlighter::highlightBlock(const QString &text)
}
}
- if (input != InputSpace) {
- if (firstNonSpace < 0)
- firstNonSpace = i;
- lastNonSpace = i;
- }
+ if (input != InputSpace && firstNonSpace < 0)
+ firstNonSpace = i;
lastWasBackSlash = !lastWasBackSlash && c == QLatin1Char('\\');