nit: cleanup function

This commit is contained in:
Sean Rhea
2009-12-02 09:52:00 -05:00
parent d2d0ac9f1c
commit 27d55025ac

View File

@@ -477,13 +477,11 @@ bool Zones::read(QFile &file)
// end of range
int Zones::whichRange(const QDate &date) const
{
int rnum = 0;
foreach(const ZoneRange &range, ranges) {
for (int rnum = 0; rnum < ranges.size(); ++rnum) {
const ZoneRange &range = ranges[rnum];
if (((date >= range.begin) || (range.begin.isNull())) &&
((date < range.end) || (range.end.isNull()))
)
((date < range.end) || (range.end.isNull())))
return rnum;
++rnum;
}
return 0;
}