- for (unsigned r = 0, n = rowlist.size(); r != n; ++r) {
- if (rowlist[r].id() == id && rowlist[r].pos() <= pos) {
+ RowList::const_iterator bestrow = rowlist.begin();
+ RowList::const_iterator it = rowlist.begin();
+ RowList::const_iterator const end = rowlist.end();
+ for (; it != end; ++it) {
+ if (it->id() == id && it->pos() <= pos) {