summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorsuzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>2011-08-12 20:22:30 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-08-18 11:02:53 +0200
commit81f0c44f6a4fd4cfa41af5d5b292008185bf3981 (patch)
tree376f0029464338d17addb55ee74b4f387bf2852b /demos
parentd9b8c530fceced62ab620307f399c3e985640282 (diff)
downloadqt4-tools-81f0c44f6a4fd4cfa41af5d5b292008185bf3981.tar.gz
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 'demos')
-rw-r--r--demos/gradients/gradients.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/demos/gradients/gradients.cpp b/demos/gradients/gradients.cpp
index d8b739b3b0..338d8ebabd 100644
--- a/demos/gradients/gradients.cpp
+++ b/demos/gradients/gradients.cpp
@@ -219,7 +219,7 @@ void GradientEditor::pointsUpdated()
for (int i=0; i<points.size(); ++i) {
qreal x = int(points.at(i).x());
- if (i < points.size() - 1 && x == points.at(i+1).x())
+ if (i+1 < points.size() && x == points.at(i+1).x())
continue;
QColor color((0x00ff0000 & m_red_shade->colorAt(int(x))) >> 16,
(0x0000ff00 & m_green_shade->colorAt(int(x))) >> 8,