diff options
author | suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> | 2011-08-12 18:22:30 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2011-08-18 09:02:53 (GMT) |
commit | 81f0c44f6a4fd4cfa41af5d5b292008185bf3981 (patch) | |
tree | 376f0029464338d17addb55ee74b4f387bf2852b /src/scripttools | |
parent | d9b8c530fceced62ab620307f399c3e985640282 (diff) | |
download | Qt-81f0c44f6a4fd4cfa41af5d5b292008185bf3981.zip Qt-81f0c44f6a4fd4cfa41af5d5b292008185bf3981.tar.gz Qt-81f0c44f6a4fd4cfa41af5d5b292008185bf3981.tar.bz2 |
Replace 'i < len-1 && func(i+1)' by 'i+1 < len && func(i+1)'
Merge-request: 1299
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'src/scripttools')
-rw-r--r-- | src/scripttools/debugging/qscriptcompletiontask.cpp | 2 | ||||
-rw-r--r-- | src/scripttools/debugging/qscriptdebuggercodeview.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/scripttools/debugging/qscriptcompletiontask.cpp b/src/scripttools/debugging/qscriptcompletiontask.cpp index fb250b7..3c94a21 100644 --- a/src/scripttools/debugging/qscriptcompletiontask.cpp +++ b/src/scripttools/debugging/qscriptcompletiontask.cpp @@ -172,7 +172,7 @@ void QScriptCompletionTaskPrivate::completeScriptExpression() while ((pos > 0) && isIdentChar(contents.at(pos-1))) --pos; int pos2 = cursorPosition - 1; - while ((pos2 < contents.size()-1) && isIdentChar(contents.at(pos2+1))) + while ((pos2+1 < contents.size()) && isIdentChar(contents.at(pos2+1))) ++pos2; QString ident = contents.mid(pos, pos2 - pos + 1); position = pos; diff --git a/src/scripttools/debugging/qscriptdebuggercodeview.cpp b/src/scripttools/debugging/qscriptdebuggercodeview.cpp index 7c99723..65fd366 100644 --- a/src/scripttools/debugging/qscriptdebuggercodeview.cpp +++ b/src/scripttools/debugging/qscriptdebuggercodeview.cpp @@ -233,7 +233,7 @@ bool QScriptDebuggerCodeView::event(QEvent *e) return false; } int pos2 = linePosition - 1; - while ((pos2 < contents.size()-1) && isIdentChar(contents.at(pos2+1))) + while ((pos2+1 < contents.size()) && isIdentChar(contents.at(pos2+1))) ++pos2; QString ident = contents.mid(pos, pos2 - pos + 1); |