summaryrefslogtreecommitdiffstats
path: root/profile-widget/diveprofileitem.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-09-02 22:26:19 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-07 11:03:30 -0700
commitdb57a633d587444a7196c8d4274b8f327e77ceba (patch)
tree3ccb04e003b34219276e06382a24d5b6a900f6d6 /profile-widget/diveprofileitem.h
parent2bd0c2143ecfca36ffa38b48d89dad7c57634ea9 (diff)
downloadsubsurface-db57a633d587444a7196c8d4274b8f327e77ceba.tar.gz
Cleanup: constify threshold pointers in DiveProfileItem
These were pointers into the global prefs object. The user must not use these to modify the settings, therefore make them pointers-to-const. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget/diveprofileitem.h')
-rw-r--r--profile-widget/diveprofileitem.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/profile-widget/diveprofileitem.h b/profile-widget/diveprofileitem.h
index 3b9a49e82..f09c101d1 100644
--- a/profile-widget/diveprofileitem.h
+++ b/profile-widget/diveprofileitem.h
@@ -213,14 +213,14 @@ public:
PartialPressureGasItem();
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex());
- void setThresholdSettingsKey(double *prefPointerMin, double *prefPointerMax);
+ void setThresholdSettingsKey(const double *prefPointerMin, const double *prefPointerMax);
void setVisibilitySettingsKey(const QString &setVisibilitySettingsKey);
void setColors(const QColor &normalColor, const QColor &alertColor);
private:
QVector<QPolygonF> alertPolygons;
- double *thresholdPtrMin;
- double *thresholdPtrMax;
+ const double *thresholdPtrMin;
+ const double *thresholdPtrMax;
QString visibilityKey;
QColor normalColor;
QColor alertColor;