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>
This commit is contained in:
Berthold Stoeger 2019-03-19 20:05:39 +01:00 committed by Dirk Hohndel
parent dc254716cf
commit e19b71709d
3 changed files with 8 additions and 8 deletions

View file

@ -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);