summaryrefslogtreecommitdiffstats
path: root/src/qt3support/itemviews
diff options
context:
space:
mode:
authorsuzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>2011-08-12 18:22:30 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-08-18 09:02:53 (GMT)
commit81f0c44f6a4fd4cfa41af5d5b292008185bf3981 (patch)
tree376f0029464338d17addb55ee74b4f387bf2852b /src/qt3support/itemviews
parentd9b8c530fceced62ab620307f399c3e985640282 (diff)
downloadQt-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/qt3support/itemviews')
-rw-r--r--src/qt3support/itemviews/q3listbox.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qt3support/itemviews/q3listbox.cpp b/src/qt3support/itemviews/q3listbox.cpp
index 796a3b8..f1574df 100644
--- a/src/qt3support/itemviews/q3listbox.cpp
+++ b/src/qt3support/itemviews/q3listbox.cpp
@@ -3531,9 +3531,9 @@ void Q3ListBox::refreshSlot()
int col = columnAt(x);
int row = rowAt(y);
int top = row;
- while(col < (int)d->columnPos.size()-1 && d->columnPos[col+1] < x)
+ while(col+1 < (int)d->columnPos.size() && d->columnPos[col+1] < x)
col++;
- while(top < (int)d->rowPos.size()-1 && d->rowPos[top+1] < y)
+ while(top+1 < (int)d->rowPos.size() && d->rowPos[top+1] < y)
top++;
Q3ListBoxItem * i = item(col * numRows() + row);
@@ -3684,7 +3684,7 @@ int Q3ListBox::columnAt(int x) const
return numColumns() - 1;
int col = 0;
- while(col < (int)d->columnPos.size()-1 && d->columnPos[col+1] < x)
+ while(col+1 < (int)d->columnPos.size() && d->columnPos[col+1] < x)
col++;
return col;
}