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

@ -26,7 +26,7 @@ RulerNodeItem2::RulerNodeItem2() :
setFlag(ItemIgnoresTransformations);
}
void RulerNodeItem2::setPlotInfo(plot_info &info)
void RulerNodeItem2::setPlotInfo(const plot_info &info)
{
pInfo = info;
entry = pInfo.entry;
@ -152,11 +152,11 @@ RulerNodeItem2 *RulerItem2::destNode() const
return dest;
}
void RulerItem2::setPlotInfo(plot_info *info)
void RulerItem2::setPlotInfo(const plot_info &info)
{
pInfo = *info;
dest->setPlotInfo(*info);
source->setPlotInfo(*info);
pInfo = info;
dest->setPlotInfo(info);
source->setPlotInfo(info);
dest->recalculate();
source->recalculate();
recalculate();