mirror of https://github.com/CGAL/cgal
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:
parent
d32a4ff717
commit
207fbb7efd
|
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue