PMP - fix remove_self_intersections() by removing BOOST_FOREACH#2626
PMP - fix remove_self_intersections() by removing BOOST_FOREACH#2626janetournois wants to merge 4 commits intoCGAL:masterfrom
Conversation
for some reason, the modified Polyhedron gets corrupted when BOOST_FOREACH loops are used here, even though these loops are not executed (because border_edges_found is false)
|
That is only for C++11 or later. As far as I know, |
|
Actually the issue #2627 suggests to add a |
| if (visited.insert(h).second) | ||
| { | ||
| one_halfedge_per_border.push_back(h); | ||
| BOOST_FOREACH(halfedge_descriptor hh, halfedges_around_face(h, tm)) |
There was a problem hiding this comment.
That BOOST_FOREACH is nested... Would it be sufficient to convert only that one?
|
I suggest that we wait to see if #2634 makes it into master, in such a case we would simply ignored this PR. |
|
@janetournois: This PR modifies more that just the for-loops. See the diff. Is that wanted? If it is, we cannot just ignore this PR in favor of #2634. |
|
Do we want to fix that bug only in |
|
4.12 and as stated above #2634 might replace it |
|
But that means that the bug in |
|
Yes, it is inside a function only used in the demo (not documented). |
|
Replaced by #2634. |
|
#2711 contains the 3 commits that there not related to the for loops. |
Summary of Changes
In
PMP/repair.h, we had to replaceBOOST_FOREACH()with a c++11 for loop to avoid a seg fault.For some reason, the modified Polyhedron gets corrupted when
BOOST_FOREACH()loops are used here, even though these loops arenot executed (because
border_edges_foundis false)Note this crash only concerns visual studio 2015 (tested with visual 2013, clang, and g++), with
-O2and not-O1.I am using boost 1.59
edit : Note also that I did not have to change all the
BOOST_FOREACHin the file, changing those corresponding to code modifying the mesh is enoughRelease Management