diff options
Diffstat (limited to 'profile-widget')
-rw-r--r-- | profile-widget/tankitem.cpp | 6 | ||||
-rw-r--r-- | profile-widget/tankitem.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/profile-widget/tankitem.cpp b/profile-widget/tankitem.cpp index 48d755dcf..75c3c35ba 100644 --- a/profile-widget/tankitem.cpp +++ b/profile-widget/tankitem.cpp @@ -61,7 +61,7 @@ void TankItem::createBar(int startTime, int stopTime, struct gasmix gas) label->setZValue(101); } -void TankItem::setData(struct plot_info *plotInfo, struct dive *d) +void TankItem::setData(const struct plot_info *plotInfo, const struct dive *d) { if (!d) return; @@ -73,7 +73,7 @@ void TankItem::setData(struct plot_info *plotInfo, struct dive *d) } // Find correct end of the dive plot for correct end of the tankbar. - struct plot_data *last_entry = &plotInfo->entry[plotInfo->nr - 1]; + const struct plot_data *last_entry = &plotInfo->entry[plotInfo->nr - 1]; plotEndTime = last_entry->sec; // We don't have enougth data to calculate things, quit. @@ -90,7 +90,7 @@ void TankItem::setData(struct plot_info *plotInfo, struct dive *d) // get the information directly from the displayed dive // (get_dive_dc() always returns a valid dive computer) - struct divecomputer *dc = get_dive_dc(d, dc_number); + const struct divecomputer *dc = get_dive_dc_const(d, dc_number); // start with the first gasmix and at the start of the dive int cyl = explicit_first_cylinder(d, dc); diff --git a/profile-widget/tankitem.h b/profile-widget/tankitem.h index 9890eb93d..eeaaf026f 100644 --- a/profile-widget/tankitem.h +++ b/profile-widget/tankitem.h @@ -14,7 +14,7 @@ class TankItem : public QGraphicsRectItem { public: explicit TankItem(const DiveCartesianAxis &axis); - void setData(struct plot_info *plotInfo, struct dive *d); + void setData(const struct plot_info *plotInfo, const struct dive *d); private: void createBar(int startTime, int stopTime, struct gasmix gas); |