summaryrefslogtreecommitdiffstats
path: root/examples/painting/gradients/gradients.cpp
diff options
context:
space:
mode:
authorsuzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>2011-08-12 20:22:30 +0200
committerQt by Nokia <qt-info@nokia.com>2011-09-12 16:03:47 +0200
commit5dd78ba08f31f9aa3c13d4e05ad4478033f7f4e8 (patch)
tree205d85f7806cbb2495ef3d4a5d043d4ec83f1ef3 /examples/painting/gradients/gradients.cpp
parent7b42532100c27280b6ea0658276511d7419742d4 (diff)
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> (cherry picked from commit 81f0c44f6a4fd4cfa41af5d5b292008185bf3981) Conflicts: src/qt3support/itemviews/q3listbox.cpp src/qt3support/sql/q3datatable.cpp src/qt3support/text/q3richtext.cpp src/scripttools/debugging/qscriptcompletiontask.cpp src/scripttools/debugging/qscriptdebuggercodeview.cpp Change-Id: Ie70590e77e69fbb9b2322c48c3963fd9cbba19e6 Reviewed-on: http://codereview.qt-project.org/4581 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'examples/painting/gradients/gradients.cpp')
-rw-r--r--examples/painting/gradients/gradients.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/painting/gradients/gradients.cpp b/examples/painting/gradients/gradients.cpp
index d8b739b3b0..338d8ebabd 100644
--- a/examples/painting/gradients/gradients.cpp
+++ b/examples/painting/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,