[Bf-blender-cvs] [d2fa88d63bb] lineart-shadow: Fix a compiler warning on Windows for Exact Boolean.

Howard Trickey noreply at git.blender.org
Tue Jul 13 10:45:56 CEST 2021


Commit: d2fa88d63bb267d7249992eedc6fddb77c1f335e
Author: Howard Trickey
Date:   Fri Jul 9 09:27:58 2021 -0400
Branches: lineart-shadow
https://developer.blender.org/rBd2fa88d63bb267d7249992eedc6fddb77c1f335e

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