diff --git a/src/AllPlot.cpp b/src/AllPlot.cpp index 65209b759..6c2dd5186 100644 --- a/src/AllPlot.cpp +++ b/src/AllPlot.cpp @@ -495,7 +495,7 @@ AllPlot::setData(RideItem *_rideItem) if (ride) { setTitle(ride->startTime().toString(GC_DATETIME_FORMAT)); - RideFileDataPresent *dataPresent = ride->areDataPresent(); + const RideFileDataPresent *dataPresent = ride->areDataPresent(); int npoints = ride->dataPoints().size(); wattsArray.resize(dataPresent->watts ? npoints : 0); hrArray.resize(dataPresent->hr ? npoints : 0); diff --git a/src/AllPlotWindow.cpp b/src/AllPlotWindow.cpp index fa7278f89..795809e8b 100644 --- a/src/AllPlotWindow.cpp +++ b/src/AllPlotWindow.cpp @@ -169,7 +169,7 @@ void AllPlotWindow::setAllPlotWidgets(RideItem *ride) { if (ride->ride) { - RideFileDataPresent *dataPresent = ride->ride->areDataPresent(); + const RideFileDataPresent *dataPresent = ride->ride->areDataPresent(); showPower->setEnabled(dataPresent->watts); showHr->setEnabled(dataPresent->hr); showSpeed->setEnabled(dataPresent->kph); diff --git a/src/RideFile.h b/src/RideFile.h index 390de1fe9..65bfb0a2d 100644 --- a/src/RideFile.h +++ b/src/RideFile.h @@ -88,7 +88,7 @@ class RideFile const QDateTime &startTime() const { return startTime_; } double recIntSecs() const { return recIntSecs_; } const QList dataPoints() const { return dataPoints_; } - inline RideFileDataPresent *areDataPresent() { return &dataPresent; } + inline const RideFileDataPresent *areDataPresent() const { return &dataPresent; } const QString &deviceType() const { return deviceType_; } void setStartTime(const QDateTime &value) { startTime_ = value; }