mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-15 08:59:55 +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:
@@ -86,9 +86,8 @@ SplitRideDialog::SplitRideDialog(MainWindow *mainWindow)
|
||||
int nDataPoint = 0;
|
||||
const RideFile *ride = mainWindow->currentRide();
|
||||
|
||||
for (QListIterator<RideFilePoint*> i(ride->dataPoints()); i.hasNext(); ++nDataPoint)
|
||||
foreach (const RideFilePoint *point, ride->dataPoints())
|
||||
{
|
||||
const RideFilePoint *point = i.next();
|
||||
if (dLastSeconds>=0 &&
|
||||
((point->secs-dLastSeconds)>=30 || nLastInterval!=point->interval))
|
||||
{
|
||||
@@ -110,6 +109,7 @@ SplitRideDialog::SplitRideDialog(MainWindow *mainWindow)
|
||||
|
||||
dLastSeconds = point->secs;
|
||||
nLastInterval = point->interval;
|
||||
++nDataPoint;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user