mirror of https://github.com/CGAL/cgal
Add some assertions to ensure that arrays of correct size are used in MC
This commit is contained in:
parent
33c0079e85
commit
49cb69fae7
|
|
@ -226,6 +226,9 @@ void triangles_to_polygon_soup(const TriangleRange& triangles,
|
|||
|
||||
// simply use increasing indices
|
||||
polygons.push_back({id + 2, id + 1, id + 0});
|
||||
|
||||
// just a safeguard against arrays of the wrong size
|
||||
CGAL_assertion(polygons.back().size() == 3);
|
||||
}
|
||||
|
||||
#ifdef CGAL_LINKED_WITH_TBB
|
||||
|
|
|
|||
|
|
@ -198,6 +198,9 @@ public:
|
|||
points.insert(points.begin(), m_points.begin(), m_points.end());
|
||||
for (const auto& tri : m_triangles) {
|
||||
triangles.push_back({ tri[0], tri[1], tri[2] });
|
||||
|
||||
// just a safeguard against arrays of the wrong size
|
||||
CGAL_assertion(triangles.back().size() == 3);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue