[Bf-blender-cvs] [4c716ced09e] master: Fix a compiler warning on Windows for Exact Boolean.

Howard Trickey noreply at git.blender.org
Fri Jul 9 15:32:29 CEST 2021


Commit: 4c716ced09efc90da7014094f83d2705cc0a9b32
Author: Howard Trickey
Date:   Fri Jul 9 09:27:58 2021 -0400
Branches: master
https://developer.blender.org/rB4c716ced09efc90da7014094f83d2705cc0a9b32

Fix a compiler warning on Windows for Exact Boolean.

For some reason, the Windows compiler didn't like the
static function being used in the parallel_reduece.

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

M	source/blender/blenlib/intern/mesh_boolean.cc

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

diff --git a/source/blender/blenlib/intern/mesh_boolean.cc b/source/blender/blenlib/intern/mesh_boolean.cc
index dddf8851767..8b8850c7cdb 100644
--- a/source/blender/blenlib/intern/mesh_boolean.cc
+++ b/source/blender/blenlib/intern/mesh_boolean.cc
@@ -1460,11 +1460,6 @@ static int find_cell_for_point_near_edge(mpq3 p,
   return c;
 }
 
-static const Vert *max_x_vert(const Vert *a, const Vert *b)
-{
-  return (a->co_exact.x > b->co_exact.x) ? a : b;
-}
-
 /**
  * Find the ambient cell -- that is, the cell that is outside
  * all other cells.
@@ -1492,7 +1487,9 @@ static int find_ambient_cell(const IMesh &tm,
   /* First find a vertex with the maximum x value. */
   /* Prefer not to populate the verts in the #IMesh just for this. */
   const Vert *v_extreme;
-
+  auto max_x_vert = [](const Vert *a, const Vert *b) {
+    return (a->co_exact.x > b->co_exact.x) ? a : b;
+  };
   if (component_patches == nullptr) {
     v_extreme = threading::parallel_reduce(
         tm.face_index_range(),



More information about the Bf-blender-cvs mailing list