switch RideFile::dataPoints to QVector

...so that we can binary search within them.  Also, switch a lot of
QListIterators to Qt foreach.
This commit is contained in:
Sean Rhea
2009-11-01 10:56:29 -05:00
parent f39f2b516b
commit 522824bb40
11 changed files with 17 additions and 41 deletions

View File

@@ -115,9 +115,7 @@ BestIntervalDialog::findClicked()
int expectedSamples = (int) floor(windowSizeSecs / secsDelta);
double totalWatts = 0.0;
QListIterator<RideFilePoint*> i(ride->dataPoints());
while (i.hasNext()) {
const RideFilePoint *point = i.next();
foreach (const RideFilePoint *point, ride->dataPoints()) {
while (!window.empty()
&& (point->secs >= window.first()->secs + windowSizeSecs)) {
totalWatts -= window.first()->watts;