Skip to content

Commit 299a89f

Browse files
authored
Added a precondition for Arrangement_on_surface_2::merge_edge(e1, e2) (#8742)
Added a precondition for merge_edge(e1, e2) that requires that two halfedges have the same direction. ## Summary of Changes The title says it all ## Release Management * Affected package(s): Arrangement_on_surface_2 * Issue(s) solved (if any): fix #8659 * Feature/Small Feature (if any): * Link to compiled documentation: * License and copyright ownership: TAU
2 parents 18f0405 + 40646af commit 299a89f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_on_surface_2.h

+1
Original file line numberDiff line numberDiff line change
@@ -973,6 +973,7 @@ class Arrangement_on_surface_2 {
973973
* u_1\f$ to \f$ u_2\f$.
974974
* \pre `e1` and `e2` share a common end-vertex, such that the two other
975975
* end-vertices of the two edges are associated with `c`'s endpoints.
976+
* \pre `e1` and `e2` have the same direction.
976977
*/
977978
Halfedge_handle merge_edge(Halfedge_handle e1,
978979
Halfedge_handle e2,

Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ class Arr_counting_traits_2 : public BaseTraits {
411411
m_object(base.construct_opposite_2_object()), m_counter(counter) {}
412412

413413
/*! operates */
414-
X_monotone_curve_2 operator()(const X_monotone_curve_2& xc)
414+
X_monotone_curve_2 operator()(const X_monotone_curve_2& xc) const
415415
{ ++m_counter; return m_object(xc); }
416416
};
417417

@@ -429,7 +429,7 @@ class Arr_counting_traits_2 : public BaseTraits {
429429
m_object(base.compare_endpoints_xy_2_object()), m_counter(counter) {}
430430

431431
/*! operates */
432-
Comparison_result operator()(const X_monotone_curve_2& xc)
432+
Comparison_result operator()(const X_monotone_curve_2& xc) const
433433
{ ++m_counter; return m_object(xc); }
434434
};
435435

0 commit comments

Comments
 (0)