Changed functor's result type

Technically the point() function of the TriangulationVertexBase_2 concept
has return type Point and not const Point& so we can't take a const ref here
otherwise we might take refs to temporaries.
This commit is contained in:
Mael Rouxel-Labbé 2018-01-15 13:28:03 +01:00
parent d32a4ff717
commit 207fbb7efd
1 changed files with 3 additions and 1 deletions

View File

@ -51,7 +51,8 @@ struct Extract_bare_point
}
template <typename VH>
const Point& operator()(const VH& vh) const {
Point operator()(const VH& vh) const {
CGAL_precondition(vh != VH());
return traits.construct_point_d_object()(vh->point());
}
@ -75,6 +76,7 @@ struct Extract_point_in_pair
result_type operator()(const argument_type& vp) const
{
CGAL_precondition(vp.first != Vertex_handle());
return std::make_pair(vp.first->point(), vp.second);
}
};