[Bf-blender-cvs] [2e128ba] master: Fix T39111: Boolean assert failure on widows

Sergey Sharybin noreply at git.blender.org
Wed Mar 12 18:12:45 CET 2014


Commit: 2e128baefdfd14b9614a01c11008a2efeeb2a918
Author: Sergey Sharybin
Date:   Wed Mar 12 23:10:24 2014 +0600
https://developer.blender.org/rB2e128baefdfd14b9614a01c11008a2efeeb2a918

Fix T39111: Boolean assert failure on widows

In fact we had this change a while ago, not sue what happened.

===================================================================

M	extern/carve/lib/intersect_face_division.cpp
A	extern/carve/patches/msvc_fix.patch
M	extern/carve/patches/series

===================================================================

diff --git a/extern/carve/lib/intersect_face_division.cpp b/extern/carve/lib/intersect_face_division.cpp
index ea82b7e..e826948 100644
--- a/extern/carve/lib/intersect_face_division.cpp
+++ b/extern/carve/lib/intersect_face_division.cpp
@@ -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));
diff --git a/extern/carve/patches/msvc_fix.patch b/extern/carve/patches/msvc_fix.patch
new file mode 100644
index 0000000..67431ec
--- /dev/null
+++ b/extern/carve/patches/msvc_fix.patch
@@ -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));
diff --git a/extern/carve/patches/series b/extern/carve/patches/series
index b1254dd..62a24d9 100644
--- a/extern/carve/patches/series
+++ b/extern/carve/patches/series
@@ -8,3 +8,4 @@ strict_flags.patch
 interpolator_reorder.patch
 mesh_simplify_dissolve_edges.patch
 memory_leak_fix.patch
+mavc_fix.patch




More information about the Bf-blender-cvs mailing list