mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 08:38:45 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user