Fix T39111: Boolean assert failure on widows

In fact we had this change a while ago, not sue what happened.
This commit is contained in:
Sergey Sharybin 2014-03-12 23:10:24 +06:00
parent bce924b43c
commit 2e128baefd
Notes: blender-bot 2023-02-14 11:01:29 +01:00
Referenced by issue #39111, 2.70 RC1 Windows 64, Boolean stress test.
3 changed files with 18 additions and 1 deletions

View File

@ -1121,7 +1121,9 @@ namespace {
}
// copy up to the end of the path.
std::copy(base_loop.begin() + pos, base_loop.begin() + e1_1, std::back_inserter(out));
if (pos < e1_1) {
std::copy(base_loop.begin() + pos, base_loop.begin() + e1_1, std::back_inserter(out));
}
CARVE_ASSERT(base_loop[e1_1] == p1.back());
std::copy(p1.rbegin(), p1.rend() - 1, std::back_inserter(out));

14
extern/carve/patches/msvc_fix.patch vendored Normal file
View File

@ -0,0 +1,14 @@
diff -r e82d852e4fb0 lib/intersect_face_division.cpp
--- a/lib/intersect_face_division.cpp Wed Jan 15 13:16:14 2014 +1100
+++ b/lib/intersect_face_division.cpp Wed Mar 12 23:09:19 2014 +0600
@@ -1121,7 +1121,9 @@
}
// copy up to the end of the path.
- std::copy(base_loop.begin() + pos, base_loop.begin() + e1_1, std::back_inserter(out));
+ if (pos < e1_1) {
+ std::copy(base_loop.begin() + pos, base_loop.begin() + e1_1, std::back_inserter(out));
+ }
CARVE_ASSERT(base_loop[e1_1] == p1.back());
std::copy(p1.rbegin(), p1.rend() - 1, std::back_inserter(out));

View File

@ -8,3 +8,4 @@ strict_flags.patch
interpolator_reorder.patch
mesh_simplify_dissolve_edges.patch
memory_leak_fix.patch
mavc_fix.patch