summaryrefslogtreecommitdiffstats
path: root/profile-widget/ruleritem.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-03-19 20:05:39 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-03-19 16:06:14 -0700
commite19b71709de18bbd21e6567ebd1e2e44d6539fa4 (patch)
treea1b3bcca450c52e22c5ba312a6cd6c8be2ecf2ff /profile-widget/ruleritem.h
parentdc254716cf3a7e1289f6c72f7b3b90277d18359e (diff)
downloadsubsurface-e19b71709de18bbd21e6567ebd1e2e44d6539fa4.tar.gz
Cleanup: pass const-reference to RulerItem2::setPlotInfo()
Instead of passing a pointer, pass a cons reference. This is more idiomatic and consistent with RulerNodeItem2::setPlotInfo(). Also make the reference passed to RulerNodeItem2::setPlotInfo() const, to make clear that the argument is copied. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget/ruleritem.h')
-rw-r--r--profile-widget/ruleritem.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/profile-widget/ruleritem.h b/profile-widget/ruleritem.h
index 3462a5d35..2c7c5b3ea 100644
--- a/profile-widget/ruleritem.h
+++ b/profile-widget/ruleritem.h
@@ -18,7 +18,7 @@ class RulerNodeItem2 : public QObject, public QGraphicsEllipseItem {
public:
explicit RulerNodeItem2();
void setRuler(RulerItem2 *r);
- void setPlotInfo(struct plot_info &info);
+ void setPlotInfo(const struct plot_info &info);
void recalculate();
protected:
@@ -37,7 +37,7 @@ public:
explicit RulerItem2();
void recalculate();
- void setPlotInfo(struct plot_info *pInfo);
+ void setPlotInfo(const struct plot_info &pInfo);
RulerNodeItem2 *sourceNode() const;
RulerNodeItem2 *destNode() const;
void setAxis(DiveCartesianAxis *time, DiveCartesianAxis *depth);