Skip to content

Commit

Permalink
Pass parameter by reference in CGALPolygon
Browse files Browse the repository at this point in the history
  • Loading branch information
GilesBathgate committed Jul 27, 2024
1 parent c2bb525 commit 171a74e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/cgalpolygon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ CGALPolygon::~CGALPolygon()
delete projection;
}

void CGALPolygon::appendVertex(CGAL::Point3 pt)
void CGALPolygon::appendVertex(const CGAL::Point3& pt)
{
appendVertex(pt,true);
}

void CGALPolygon::appendVertex(CGAL::Point3 pt,bool direction)
void CGALPolygon::appendVertex(const CGAL::Point3& pt, bool direction)
{
auto& pr=dynamic_cast<CGALPrimitive&>(parent);
pr.appendVertex(this,pt,direction);
Expand Down
4 changes: 2 additions & 2 deletions src/cgalpolygon.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ class CGALPolygon : public Polygon
explicit CGALPolygon(class CGALPrimitive&);
~CGALPolygon() override;

void appendVertex(CGAL::Point3);
void appendVertex(CGAL::Point3,bool);
void appendVertex(const CGAL::Point3&);
void appendVertex(const CGAL::Point3&,bool);

QList<CGAL::Point3> getPoints() const;
QList<CGAL::Point2> getProjectedPoints();
Expand Down

0 comments on commit 171a74e

Please sign in to comment.